So..
I have a javascript that makes a popup with a javscript function in it.
The function in the popup after 5 seconds tries to change the "price" field value in the opener window:
This bunch of code is working perfectly if it is run from the page where the "price" field is.
BUT..
Im trying to launch this script from one page and the "price" field is in another page. So I add to this code one more line
So the script should make a popup with the function and redirect itself. After 5 seconds the popup changes the fields "price" value.
The whole script looks like this:
Why the hack it is not working?? The popup opens correctly. The main page redirects correctly, but the field changing is not wokring! :mad:
I have a javascript that makes a popup with a javscript function in it.
The function in the popup after 5 seconds tries to change the "price" field value in the opener window:
Code:
sourze= "<script type=%20text/javascript%20> function change(){ window.opener.document.forms[0].price.value=123;}; setTimeout('change()',5000);</script>"; thepopup=window.open( '' , 'name' , 'height=5,width=5'); logs.document.writeln(sourze);
BUT..
Im trying to launch this script from one page and the "price" field is in another page. So I add to this code one more line
Code:
window.location="http://www.anotherpage.com";
The whole script looks like this:
Code:
sourze= "<script type=%20text/javascript%20> function change(){ window.opener.document.forms[0].price.value=123;}; setTimeout('change()',5000);</script>"; thepopup=window.open( '' , 'name' , 'height=5,width=5'); logs.document.writeln(sourze); window.location="http://www.anotherpage.com";
Comment