Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change target of Iframe using javascript

Status
Not open for further replies.

rgstewart

Technical User
Oct 2, 2000
343
GB
I am using this code:

document.getElementById("storyframe").src=newSrc;

where newSrc is a variable containing the new address, to change the contents of an Iframe whose ID is 'storyframe'. It works fine in Firefox, Exploder and Safari, but it does nothing whatsoever in Opera.

Any ideas why?

Any ideas on how to modify to get it to work?
 
Thanks 1DMF ... that looks like a fairly comprehensive explanation! I'll read it in depth later and test it out.

Thanks again - very much appreciated.
 
great :)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top