Jump to content

setTimeOut is not defined


Axeia

Recommended Posts

I'm starting to suspect that I'm overlooking something basic as even after dumbing down my code to the example below it still throws a nice

"SetTimeOut is not defined" error in the Firefox Error console.

 

So anyone got any suggestions on how to get this to work instead of throwing errors?

<script type="text/javascript">
  document.getElementById('tags').addEventListener('focus', function(e){
    setTimeOut( "document.getElementById('navbar').style.display = 'none';", 100 );
  }, false);
</script>

Link to comment
https://forums.phpfreaks.com/topic/192168-settimeout-is-not-defined/
Share on other sites

I'm almost ashamed to admit it, but that worked, gah!

Which is rather odd because I copy/pasted it from a greasemonkey script I wrote myself where it did work.

 

Oh well, you have my thanks! a second pair of eyes always comes in handy..

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.