jquery - How can i revoke a setTimeout variable from an iframe (Javascript)? -


i have problem settimeout , cleartimeout: in index.php:

enter code here datevar  = new date(); timer = settimeout(function() {myfuncfirst();}, 10000); $(document).click(function(e)                         {                           cleartimeout(timer);                           timer = settimeout(function() {myfuncnext();}, 10000);                          }); 

than want use cleartimeout in iframe in myframe.php :

cleartimeout(parent.timer); 

i couldn't but, same code running

parent.datevar = new date(); 

why happening? how can solve that?

you can't interact variables within iframe. page loaded inside iframe separate page.

to overcome might want ajax talk between 2 pages, between 2 websites.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -