Modify URL in iframe
|
|
Hey, I want to change the URL in the iframe tag where is id=site. <"iframe src="http://zubux.com/register.php?r=rocashbux" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="yes" width="100%" id="site"><"/iframe"> Look at above tag , i want to change URL in iframe tag where the id=site, Thanks, |
|
|
edited - msg deleted |
|
|
I'll give you a headstart: document.getElementById("site").src
|
|
|
Normally jerone would be right, but I tried this on RoCashBux and it returns no errors yet doesn't work. I also tried removing all the nodes returned with the xpath "//iframe" but still no errors and it doesn't work. The only thing that worked for me was removing the whole body.innerHTML and replacing it with the same html except no iframe with it. (See this script for more info on that)
|
|
|
If an iframe doesn't have a url, it's probably imported trough javascript and the url wasn't set. The url should then just be (about:)blank. |
|
|
Thanks Simmons, it is working for me, |
