www.webdeveloper.com

Search:

Type: Posts; User: Sterling Isfine

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. I.E. couldn't handle that syntax:

    I.E. couldn't handle that syntax:

    <script type='text/javascript'>
    (function()
    {
    var allInps = document.getElementsByTagName('input'), allCb = [];

    for( var i = 0, len = allInps.length; i <...
  2. View Post

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>Test Page</title>
    <meta http-equiv="content-type" content="text/html;...
  3. I've no idea what that means. No they're...

    I've no idea what that means.
    No they're irrelevant. If you apply that code to the table you posted it will synchronise the checkboxes with the same value attribute, whenever one is clicked, which...
  4. Put this block somewhere below the form and it...

    Put this block somewhere below the form and it will synchronise all checkboxes in the document with the same value:
    <script type='text/javascript'>
    (function()
    {
    var allInps =...
  5. Replies
    7
    Views
    1,857

    I know what it meant to do but starting the array...

    I know what it meant to do but starting the array at 0 (as you should) means that 0 is a legitimate value but fails the test:

    if (!readCookie("a")) which should be


    if ( readCookie("a") !==...
  6. Not all browsers support onchange for the ...

    Not all browsers support onchange for the <form> tag.
    Apply the event to the <select> tag.
    setCookie should take a days duration parameter.


    <select name="view" onChange="jsFnc_OrderView( this...
  7. Replies
    7
    Views
    1,857

    If record is 3 at this point, you are resetting...

    If record is 3 at this point, you are resetting it to 1 and storing it as 2. It can't reach 3.

    Try

    Your code (if you insist on using cookies) can be simplified to this:

    var...
  8. Option elements do not as standard support...

    Option elements do not as standard support events.
    Use the onchange event of the <select> tag.
  9. Such a facility just encourages sloppy coding...

    Such a facility just encourages sloppy coding practice. It's like using break or an intermediate return statement, it does the job but makes code harder to debug. If a condition is not met you just...
  10. Replies
    3
    Views
    1,306

    I can't think of a scenario in which that could...

    I can't think of a scenario in which that could happen. Do you have a URL?
  11. This is totally untested but try it. If it fails,...

    This is totally untested but try it. If it fails, post any console error message.
    "blank.jpg" can be any replacement image.

    <script type="text/javascript" >

    function ChangeMedia()
    {
    var...
  12. Replies
    3
    Views
    1,306

    Do you have a querystring in your URL? ...

    Do you have a querystring in your URL?

    parent.location or more correctly parent.location.href must match "http://domain.com/store.html" exactly.

    Try alerting parent.location.href

    Try:
    if (...
  13. Replies
    3
    Views
    1,177

    The error console would have indicated that.It...

    The error console would have indicated that.It doesn't split anything, it just uses a regular expression to find the required name=value and saves the second parenthesised match, which is the value....
  14. Replies
    3
    Views
    1,177

    I think it would be a lot simpler just to read...

    I think it would be a lot simpler just to read both cookies separately using a dedicated function, then process the results.

    function readCookie( cName )
    {
    var v;

    return (...
  15. Replies
    4
    Views
    3,438

    A while loop is like a for loop without the...

    A while loop is like a for loop without the convenience of separate initialise and execute sections. do-while is like while but always executes once. Just change the places that you initialise and...
  16. Replies
    4
    Views
    3,438

    Try: document.write(" ");

    Try:
    document.write("&nbsp;");
  17. Replies
    5
    Views
    3,133

    You're passing the wrong parameter to the...

    You're passing the wrong parameter to the swapimage function. The first parameter should be the id of the image not the map. Firefox is probably combining the two elements internally which is why it...
  18. <input type='text' value='Email' onfocus='if( this.value == this.defaultValue ){this.value = ""; }'
    onblur='if( !/\S/.test( this.value ) ){ this.value = this.defaultValue; }' >
  19. Firefox does give a 'too much recursion' error....

    Firefox does give a 'too much recursion' error. It seems to be related to
    selectElement being allowed to call itself.
  20. Replies
    9
    Views
    1,444

    If you assign the function as an event handler,...

    If you assign the function as an event handler, this points to the element. You can use call to specify the correct scope:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"...
  21. Dynamically created elements don't show in page...

    Dynamically created elements don't show in page source nor do they need to in order to be referenced. Post all your code.
  22. Replies
    8
    Views
    2,551

    Doing that, the first problem you should have...

    Doing that, the first problem you should have encountered is that your if test condition always fails. Testing the conditions individually reveals that element.canHaveChildren isn't supported by...
  23. Replies
    8
    Views
    2,551

    If a function doesn't behave as you expect, you...

    If a function doesn't behave as you expect, you step through it to find out where it's going wrong. In Javascript the simplest way is to insert alert statements at different points to discover which...
  24. Replies
    6
    Views
    1,589

    The A in AJAX stands for 'asynchronous'....

    The A in AJAX stands for 'asynchronous'.
    validateusername may terminate before the readystatechange handler executes with a status of 4, so the return statement is unreliable to useless.
    Unless...
  25. Replies
    1
    Views
    1,450

    You can't Use JS to read the content from another...

    You can't Use JS to read the content from another domain.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4
HTML5 Development Center



Recent Articles