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
Post a Comment