Modify URL in iframe

Subscribe to Modify URL in iframe 6 posts, 3 voices

 
XphpX Scriptwright

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,

 
XphpX Scriptwright

edited - msg deleted

 
jerone Scriptwright

I'll give you a headstart:

document.getElementById("site").src

 
JoeSimmons Scriptwright

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)
Hope that helped. XphpX, this is the right way to use ID's but for some reason it doesn't work on that site.

 
jerone Scriptwright

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.

 
XphpX Scriptwright

Thanks Simmons, it is working for me,