|
|
| Author |
Message |
Rayman2
Joined: 18 Aug 2008
Posts: 8
|
Posted: Sat Sep 06, 2008 6:01 pm Post subject: setTimeout |
|
|
hi
i cant get setTimeout to work
i have it like this
var f = MainWindow.document.parentWindow.setTimeout("MainWindow.document.parentWindow.alert ('v if')",5000);
and it wont work at all
anyone got that working?
tznx luka
i am using IE 7 |
|
| Back to top |
|
 |
Rayman2
Joined: 18 Aug 2008
Posts: 8
|
Posted: Mon Sep 08, 2008 10:41 am Post subject: |
|
|
| anyone? |
|
| Back to top |
|
 |
shiryavsky
Joined: 18 Mar 2010
Posts: 2
|
Posted: Thu Mar 18, 2010 7:59 am Post subject: |
|
|
It's real sh*t, because:
| Quote: |
MainWindow.document.parentWindow.setTimeout("alert('aa')",10);
|
OK, but
| Quote: |
var a=1;
MainWindow.document.parentWindow.setTimeout("alert(a)",10);
|
a undefined!!
This function is called in a different script-space. |
|
| Back to top |
|
 |
shiryavsky
Joined: 18 Mar 2010
Posts: 2
|
Posted: Thu Mar 18, 2010 8:08 am Post subject: |
|
|
Found!
| Quote: |
var a=1;
MainWindow.document.parentWindow.setTimeout(function () {
MainWindow.document.parentWindow.alert(a);
}, 100);
|
|
|
| Back to top |
|
 |
|