Changing frame sources
I will be direct.
How do I change the source of a frame? I don't want to change the source URL, I want to change the source itself.
Let's say I have a frame, and the source of the frame is:
Then there's a textbox where the user types a planet name, for example. If him typed "mars" the new source would be:
Tried google, but it only teaches how to change the source URL.
what you call 'source of a frame'? are you talking about changing text between <p></p> tags? or it is changing elements on a page in an iframe?
If you want to change the content in the iframe, the data into a tag, you can use this syntax:
myIFrame.contentWindow.document.getElementById('id_elm_in_iframe').innerHTM = 'New data';
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)