By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,953 Members | 1,574 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,953 IT Pros & Developers. It's quick & easy.

How do we load page into iframe when not on iframe page?

P: n/a
HI! how do we load a page from the menu into an iframe when you are not
on the iframe page?

I want to be able to load pages (options in my menu ) into a iframe no
matter if I am on the iframe page or not.

how do we do this.

Right I have two menu's because I dont know how to do this. one for
other pages that dont have the iframe in question and another for the
iframe page with the options available.

Look here to see what I mean.

*** Sent via Developersdex ***
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
> I want to be able to load pages (options in my menu )
into a iframe no matter if I am on the iframe page or not.

If you click a link in your iframe, then it will be loaded into iframe
by default, no actions from your side are needed.

If you click a link on the parent page (containing iframe), you should
target the link in the conventional way:

<a href="foo.html" target="iframeName">Link</a>

Please note that:
(1) target attribute refers to the NAME of frame/iframe, not its ID
(2) despite not directly prohibited, but setting both NAME and ID for
frame/iframe may lead for all kind of bizzare things. So I suggest to
set NAME only.

Jul 23 '05 #2

P: n/a
HI! Thanks for responding. its not that. my link is not in the iframe.
Its on a different page completly.

eg. Index.htm is does not hold the IFRAME001 iframe. so on this page I
want to have a menu that hold the options pages to go into the Iframe
BUT on Another page called "Premium_templates" with holds the Iframe001.

Right now I have two menus because I dont know how to call a URL (
premium_templates.htm) and also load another specific page ( from the
menu ) into the Iframe on ( premium_template.htm) from Index.htm.

Go to my site an see what I mean.

This is the index page. if you hover over Templates there is NO options
right now. ( But I want to have them )

NOW go to this page and you will see the options when you hover this
time over templates.

The options here when clicked will load the selections into the
iframe001 and at this point all is well. BUT how do I load them from the
index.htm page?

Paul :)

*** Sent via Developersdex ***
Jul 23 '05 #3

P: n/a
As much as I understood, you have:
StarterPage (index.html)
DisplayPage (with iframe on it)
The StarterPage spits out DisplayPage, and you want to address
DisplayPage.Iframe from the StarterPage. If it's correct, then from
StarterPage you do:
<span onclick="DisplayPage.frames[0].src = 'foo.html';">Link</span>

I'm not suggesting you any <a> (with default behavior overpass) because
you solution is too havy relies on JavaScript so no reasonnable
roll-back can be proposed (if JavaScript is not presented).

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.