Associating Iframe pages with a specific page. Server side

P

paul dallaire

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
 
G

Giles

paul dallaire said:
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
 
P

Paul

Cool. Thanks, that's what I was looking for. I will see about server
side.

Thanks again. :)

Paul
 
D

Dave Anderson

paul said:
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.html#type-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.
 
P

Paul

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
 
D

Dave Anderson

NOTE: I will not respond further if you don't quote the text you are
replying to.
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/frames.html#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/d...hor/dhtml/reference/dhtml_reference_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.
 
P

Paul

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 said:
NOTE: I will not respond further if you don't quote the text you are
replying to.
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/frames.html#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/d...hor/dhtml/reference/dhtml_reference_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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top