controlling IFRAME with JavaScript

X

Xero

hello,

how can i change the page displayed in an <iframe> element using JavaScript?

(in JavaScript, not the 'target' property of the <a> tag please)

thanks,

Xero
 
D

David Berry

Give the frame an ID and name. Ex: id="myFrame" name ="myFrame". Then you
can access it via JavaScript. Ex:

document.frames("myFrame").src = "nextpage.htm"
or
document.all.myFrame.src = "nextpage.htm";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top