Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
02-03-2011, 05:05 PM #1
- Join Date
- Feb 2011
- Thanked 0 Times in 0 Posts
change source of iframe after page has loaded
Im very new to java scripting so any help would be truly appreciated. I have a single web page that loads several iframes. One of the iframe pages has to be logged in first. I have that taken care of but once the page is loaded I need to change the source to a link with in the page. My guess is I need something to execute the code like a onload or something. This is what Ive been trying to get to work but like I said a newb!
The iframe in question is named "cad"
the initial source once loaded is 'https://urlname.com/mainmenu.asp'
the source I need to change to is 'https://urlname.com/UnitStatusF.asp?agency_id=28'
var iframeid = document.getElementById(cad);
var unitstatus = 'https://urlname.com/UnitStatusF.asp?agency_id=28'
if (iframeid.src = 'https://urlname.com/mainmenu.asp')
iframeid.src = unitstaus;
02-03-2011, 05:43 PM #2
- Join Date
- Jun 2002
- London, England
- Thanked 2,563 Times in 2,541 Posts
"I know that you believe that you understand what you think I said, but, I am not sure you realise that what you heard is not what I meant". (Robert