Web Analytics Made Easy -
StatCounter setTimeout not working on this code please help. - CodingForum

Announcement

Collapse
No announcement yet.

setTimeout not working on this code please help.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resolved setTimeout not working on this code please help.

    I have been working on this forever trying to use a settimeout delay... it works fine with a little alert box but when i put the actual code in it fails where is my syntax incorrect or what is wrong with this code

    this works it waits five seconds then alerts hello
    Code:
    setTimeout("alert('hello')", 5000)
    this fails
    Code:
    setTimeout("input.click()", 5000)
    here is the rest of the code around it if it is relevant. I'm a newbie

    Code:
    Array.forEach(document.getElementsByTagName("INPUT"),function(input)
     {if (input.value=="Deposit Amount") 
           { setTimeout('input.click()', 5000)			
           }
     }
       
    );
    Last edited by bill.shaw; Apr 14, 2009, 04:01 PM.

  • #2
    I did a search for settimeout and found a post talking about an anonymouse function... it solved my problem. sorry for posting too early.

    Comment

    Working...
    X