471,603 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,603 software developers and data experts.

Changing an iframe

23
Hello, Dumb question... I have a web page that uses a couple of iframes, and what I would like to do is have a link on the main page that changes an iframe without refreshing the main page. I know it's possible to have a link in one iframe affect another iframe without refreshing the parent because that's the way I've been doing it up til now, but can a link on the parent affect an iframe without refreshing it so that I can get rid of the iframes that exist for only that purpose?

(let me know if I'm not making any sense, I havn't slept in a while and I may be rambling)
Oct 7 '07 #1
2 1452
Hello, Dumb question... I have a web page that uses a couple of iframes, and what I would like to do is have a link on the main page that changes an iframe without refreshing the main page. I know it's possible to have a link in one iframe affect another iframe without refreshing the parent because that's the way I've been doing it up til now, but can a link on the parent affect an iframe without refreshing it so that I can get rid of the iframes that exist for only that purpose?

(let me know if I'm not making any sense, I havn't slept in a while and I may be rambling)
Yes you can, all you do is this:
say iframe1 is the name of the iframe,
[HTML]<a href="URL" target="iframe1">Link</a>[/HTML]
hope it helps
Oct 7 '07 #2
Z1P2
23
Yes it does, and for the reference of others, if you are using a drop down form, it would look like this:

Expand|Select|Wrap|Line Numbers
  1. <FORM name="Whatever name"><SELECT size=1 name="URL" onChange="if(options[selectedIndex].value)iframe1.location.href=(options[selectedIndex].value)">
Oct 7 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by DJ WIce | last post: by
5 posts views Thread by Jim Marquardson | last post: by
4 posts views Thread by Robson Carvalho Machado | last post: by
3 posts views Thread by David Virgil Hobbs | last post: by
3 posts views Thread by Prasad | last post: by
3 posts views Thread by bulldog8 | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.