Advanced Search

Search:

Type: Posts; User: clueful; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.02 seconds.

  1. They compile identically and the for loop could...

    They compile identically and the for loop could be said to make its operation clearer.

    When used as a for loop action I see no difference between them.

    Which don't exist due to the browser...
  2. Eliminate the onload handler by putting this at...

    Eliminate the onload handler by putting this at the end of the document:


    (function()
    {
    var radioButtons = document.getElementsByName("link-type");

    for ( var i = 0; radioButtons[ i ];...
  3. Replies
    12
    Views
    2,377

    I doubt that internally it makes any difference....

    I doubt that internally it makes any difference.

    Nesting the entire declaration inside {}, means that the properties of the object have to be comma-separated, which introduces far more opportunity...
  4. Replies
    12
    Views
    2,377

    I've created a viable apology for the 'triple...

    I've created a viable apology for the 'triple combo' script. It still needs a bit of work before publishing but here's the working example. It uses a subset of your data, (enough for the first option...
  5. Replies
    12
    Views
    2,377

    That's because you have duplicated array...

    That's because you have duplicated array declarations, which exposes a serious shortcoming of this script.

    Normally I don't contribute to this site's scripts, but I may make an exception to fix...
  6. Replies
    12
    Views
    2,377

    Works OK for me.

    Works OK for me.
  7. Replies
    14
    Views
    1,845

    Replace your randomlink function with this: ...

    Replace your randomlink function with this:

    function randomlink()
    {
    return randomlinks.splice( Math.floor( Math.random() * randomlinks.length ), 1 )[ 0 ];
    }

    To make it even easier to...
  8. Replies
    14
    Views
    1,845

    I can't quite fathom what you're asking. Are you...

    I can't quite fathom what you're asking. Are you saying periodically you need to add elements to the array but don't want to add an index [n] to each one? If so that's easy, but I suspect this code...
  9. Replies
    12
    Views
    2,377

    Presumably your CSV file must be formatted in...

    Presumably your CSV file must be formatted in such a way that the option hierarchy can be interpreted. If so I
    think the most efficient solution would be to create a simulated database using your...
  10. How did you reach this level of coding without...

    How did you reach this level of coding without learning to use the error console?

    document.getElementById expects an ID.
  11. Thread: Select list

    by clueful
    Replies
    3
    Views
    813

    I'm pretty sure this is what you mean:...

    I'm pretty sure this is what you mean: http://scripterlative.com/files/selectunique.htm
  12. Replies
    8
    Views
    2,281

    I need to reprise this subject following a report...

    I need to reprise this subject following a report that when testing one of my scripts under Chrome, the above test gave a false positive. I couldn't investigate the cause, but have since concluded...
  13. Thread: X Browser AJAX

    by clueful
    Replies
    7
    Views
    1,139

    What is the exact nature of the problem, and what...

    What is the exact nature of the problem, and what is preventing you debugging it?
  14. Replies
    8
    Views
    2,281

    I read on a thread somewhere that on a particular...

    I read on a thread somewhere that on a particular ms platform you need to test for 'onmsgesturechange' instead.
    I can't verify that, but to be on the safe side I would use:

    var isTouchDevice = (...
  15. document.cookie may contain other data other than...

    document.cookie may contain other data other than that you set, therefore the above test is flawed.
  16. Try onChange="if( !/^http/.test( this.value ) ){...

    Try
    onChange="if( !/^http/.test( this.value ) ){ scrollTo(this.value); } else{ top.location.href = this.value }
  17. That code must be positioned below the elements...

    That code must be positioned below the elements to which it refers. Is it?
  18. Replies
    2
    Views
    1,134

    Forms should not be addressed by their name...

    Forms should not be addressed by their name attribute, not least because they shouldn't have one.

    Since you haven't shown the calling code, I would guess that you're using the onchange event, when...
  19. ...

    <doctype html>
    <html>
    <head>
    <title>Increment/Decrement</title>
    <script type="text/javascript">
    function incrementButtons( upBtn, downBtn, qtyField )
    {
    var step = parseFloat( qtyField.value...
  20. Replies
    17
    Views
    4,078

    I assumed that lootarray was an object property,...

    I assumed that lootarray was an object property, which it isn't.

    Remember that values stored in localStorage are always strings and shouldn't be numerically compared or added.
  21. Replies
    17
    Views
    4,078

    Try playerLoot[ "lootArray" ][ 0 ];

    Try
    playerLoot[ "lootArray" ][ 0 ];
  22. Replies
    17
    Views
    4,078

    You don't have an array called loot, it is an...

    You don't have an array called loot, it is an object which has no length property and its properties cannot be addressed by a numeric index.

    You could use for-in to build an array of the...
  23. Replies
    8
    Views
    4,352

    Resolved Of course there's an error because it's still...

    Of course there's an error because it's still failing to load files that aren't there, and
    Is addressing an element that doesn't exist.

    If you load your iframe document directly, you'll see that...
  24. Replies
    1
    Views
    881

    You cannot have two objects in common scope with...

    You cannot have two objects in common scope with the same name.

    Be advised that only IE supports form disabling.



    (function( id, secs ) // Put me *below* the form
    {
    var theForm =...
  25. Replies
    6
    Views
    1,896

    Acording to FireBug you're failing to load...

    Acording to FireBug you're failing to load jquery.js although it doesn't appear to be needed.

    Under Firefox your slider seems to work.

    Check that JS is enabled and that you're not viewing a...
Results 1 to 25 of 129
Page 1 of 6 1 2 3 4