Opera 6 setTimeout not working?
Posted: Tue Feb 20, 2007 10:40 pm
feyd | Please use
Latest JS Attempt
HTML Event
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
The code works great in Opera 6 but only without the timeout. Old versions of [url=http://www.oldapps.com/opera.htm]Opera[/url] are available to download.
[b]Original JS Code[/b]
[syntax="javascript"]function hideDiv(divID_as_a_string) {
var myReference = getRefToDiv(divID_as_a_string);
if( !myReference ) { window.alert('Nothing works in this browser'); return; }
if( myReference.style ) { myReference.style.visibility = 'hidden'; } else {
if( myReference.visibility ) { myReference.visibility = 'hide'; } else {
window.alert('Nothing works in this browser'); return; } }
}Code: Select all
function hideTimedDiv(divID_as_a_string) {
setTimeout ("hideTimedDiv('" + divID_as_a_string + "',3000);"); {
var myReference = getRefToDiv(divID_as_a_string);
if(!myReference ) { window.alert('Nothing works in this browser'); return; }
if( myReference.style ) { myReference.style.visibility = 'hidden'; } else {
if( myReference.visibility ) { myReference.visibility = 'hide'; } else {
window.alert('Nothing works in this browser'); return; } }
}
}<element onEVENT="hideTimedDiv('exampleb8');"
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]