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

Associating Iframe pages with a specific page. Server side

P: n/a
HI! I need to associate a iframe pages to a specific page for my menu
system.

I want to be able to click on my menu system anywhere on my site and the
options that is clicked will load that options ( iframe page ) into a
specific page that holds the iframe.

Right now the options are only available when on the page that holds the
Iframe in question ( templates.htm )but if you are on another page (
index.htm) how do we tell it to load that option into ( templates.htm ) ?

I think I need some kind of ASP script that would associate any Iframe page
that I specify to the ( Templates.htm ) page.

How do we do this? does anyone have any ideas/examples ?

Paul

Jul 22 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a

"paul dallaire" <pa***********@sympatico.ca> wrote
HI! I need to associate a iframe pages to a specific page for my menu
system.
I want to be able to click on my menu system anywhere on my site and the
options that is clicked will load that options ( iframe page ) into a
specific page that holds the iframe.
Paul


Total air code, but may give you some ideas...

Menu -
<a href="mainpage.asp?ifp=subpage.asp">Click</a>

mainpage.asp -
<%
ifpsrccode="document.getElementbyid.if1.src='" & request("ifp") & "'"
%>
<html>
....
<body onload="<%=ifpsrccode%>">
<iframe id=if1 name=if1></iframe>
....
</html>

However, there must be easier (and non-clientside) ways! Try looking at
server.execute, or XMLHTTP etc
IME "clever coding" is a nightmare for someone else to pick up if they have
to work with your coding in future. Often better just to write the extra
pages as stand-alones unless it is more than 100 or so...
Giles
Jul 22 '05 #2

P: n/a
Cool. Thanks, that's what I was looking for. I will see about server
side.

Thanks again. :)

Paul

*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #3

P: n/a
paul dallaire wrote:
I want to be able to click on my menu system anywhere on my site and
the options that is clicked will load that options ( iframe page )
into a specific page that holds the iframe.


What's wrong with target="_top" ?
http://www.w3.org/TR/html401/types.h...e-frame-target

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #4

P: n/a
HI! _top will not work because its not always on the page which holds
the Iframe.

The menu is on all pages and the user could be on index.htm and the page
which holds the iframe is called premium.htm.

So if the user clicks the menu when on index.htm we have to put the
iframe_page into the premium.htm and display it.

Paul

*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #5

P: n/a
NOTE: I will not respond further if you don't quote the text you are
replying to.

Paul wrote:
HI! _top will not work because its not always on the page which
holds the Iframe.
_top will always target the outermost window, so its behavior will be
identical no matter where it is clicked. That said, ...
The menu is on all pages and the user could be on index.htm and
the page which holds the iframe is called premium.htm.
Please stop confusing pages with frames. You don't target pages.

target = frame-target [CI]
This attribute specifies the name of a frame where a document
is to be opened.
(http://www.w3.org/TR/html401/present...ml#adef-target)
So if the user clicks the menu when on index.htm we have to put
the iframe_page into the premium.htm and display it.


This is a solved problem. Consider this URL:
http://msdn.microsoft.com/library/de...ence_entry.asp

The links in the tree at left target the right. What do you suppose the link
to [Properties] looks like? I'll share:

<a
href="/library/default.asp?url=/workshop/author/dhtml/reference/properties.asp"
title="Properties" target="_top">Properties</a>

See how that works? It still changes the content of the content frame, even
though it targets _top. That is one way to get consistent behavior.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #6

P: n/a
HI! sorry about the quote problem. I never has too before. I always just
response to the actuall users post in question. I am not sure how to quote
as I have never done so.

Has for _top well I can use it if I am on the page ( eg. page_frame.htm )
that holds the Iframe ( Iframe001). I can load any given page into the
Iframe while on page_frame.htm.

Now what if I am on index.asp and I have a menu with sub options. I want
those sub options (eg, 1.htm, 2.htm, 3.htm..ect..) to load into Iframe001.
How do we do that?

Paul.
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:eQ**************@TK2MSFTNGP14.phx.gbl...
NOTE: I will not respond further if you don't quote the text you are
replying to.

Paul wrote:
HI! _top will not work because its not always on the page which
holds the Iframe.


_top will always target the outermost window, so its behavior will be
identical no matter where it is clicked. That said, ...
The menu is on all pages and the user could be on index.htm and
the page which holds the iframe is called premium.htm.


Please stop confusing pages with frames. You don't target pages.

target = frame-target [CI]
This attribute specifies the name of a frame where a document
is to be opened.
(http://www.w3.org/TR/html401/present...ml#adef-target)
So if the user clicks the menu when on index.htm we have to put
the iframe_page into the premium.htm and display it.


This is a solved problem. Consider this URL:
http://msdn.microsoft.com/library/de...ence_entry.asp

The links in the tree at left target the right. What do you suppose the
link to [Properties] looks like? I'll share:

<a
href="/library/default.asp?url=/workshop/author/dhtml/reference/properties.asp"
title="Properties" target="_top">Properties</a>

See how that works? It still changes the content of the content frame,
even though it targets _top. That is one way to get consistent behavior.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.

Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.