www.webdeveloper.com

Search:

Type: Posts; User: lwc

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,540

    Thanks. BTW, why does this only work for the...

    Thanks. BTW, why does this only work for the first catch:


    theregex = "<script>([\s\S]+?[^<\/script>])<\/script>"
    theregex1 = new RegExp(theregex, "gi")
    if (theregex1.test(text)) { //...
  2. Replies
    4
    Views
    1,540

    Alright, I've programmed the solution myself: ...

    Alright, I've programmed the solution myself:


    <span id=dynamictext>hey</span><hr>
    <input type=button onclick="bla(0)" value=Button0><hr>
    <input type=button onclick="bla(1)" value=Button1><hr>...
  3. Replies
    4
    Views
    1,540

    Dynamic loading of

    I have a code that adds dynamic text to a page:

    document.getElementById("dynamic").innerHTML = text
    However, sometimes the text contains actual javascript. It seems it won't run because the page...
  4. Replies
    18
    Views
    3,407

    If I put the previous HTML inside a table: ...

    If I put the previous HTML inside a table:

    <table><tr><td><form method="post"></td></tr>
    <tr><td><input type=checkbox name=check[] onclick="bla(this)"></td></tr>
    <tr><td><input type=text...
  5. Replies
    18
    Views
    3,407

    Well, since it doesn't give you a unique ID/name...

    Well, since it doesn't give you a unique ID/name (if you use array named form fields), you can't use getElementByName/ID on the resulting child.

    Even more so, the previous/nextsibling method...
  6. Replies
    18
    Views
    3,407

    Oh, how I loath the don't edit policy. Sometimes...

    Oh, how I loath the don't edit policy. Sometimes x.nodeType is 1 to begin with. It seems to be fixed by changing

    while (x.nodeType!=1)
    to

    while (x.name == undefined)



    <form...
  7. Replies
    18
    Views
    3,407

    Please allow more edit time, as the previous post...

    Please allow more edit time, as the previous post could have been replaced by the following. I've programmed a way to control the amount of next/previous in next/previousSibling:


    <form...
  8. Replies
    7
    Views
    2,556

    You can't (well, at least shouldn't) use...

    You can't (well, at least shouldn't) use something like

    if (!a)
    because false is a valid value (e.g. add(false)). What you need is Javascript's equivalence of
    PHP's isset.

    I wish Javascript...
  9. Replies
    1
    Views
    1,001

    Ultimate equivalence of PHP's isset

    This is also served to declare default values in functions.

    Seemingly, the solution is:

    if (myvar == undefined)
    Alas,

    A solution is given for this:

    But I'd like to ask fellow posters...
  10. Replies
    18
    Views
    3,407

    Oh yeah, now I remembered why I used brackets in...

    Oh yeah, now I remembered why I used brackets in the first place!

    Thanks tirna for the clarification about input vs. input1. Though I just used "input" for this example, I'll remember from now on...
  11. Replies
    18
    Views
    3,407

    I think you confused "justinput" with "input". I...

    I think you confused "justinput" with "input". I never had two different types of "input". Nevertheless, thanks for the discovery about the lack of need of "[]". I never imagined it wasn't even...
  12. Replies
    18
    Views
    3,407

    No, what I meant was how do I tell the second...

    No, what I meant was how do I tell the second checkbox to change the second input field, simply because both of them are second?
  13. Replies
    18
    Views
    3,407

    Thanks! But as for the second part, how do you...

    Thanks! But as for the second part, how do you change the name that has a matching index to the checkbox? In this case, it would be 1.
  14. Replies
    18
    Views
    3,407

    Accessing array named form fields

    I only manage to access non array named form fields.


    <form method="post">
    <input type=checkbox name=check[]>
    <input type=text name=justinput value=testing>
    <hr>
    <input type=checkbox...
Results 1 to 14 of 14
HTML5 Development Center



Recent Articles