473,385 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Associating Iframe pages with a specific page. Server side

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
6 1603

"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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: google | last post by:
I have a HTML file that contains an iframe. The HTML file is served by one server. The iframe contains a link to a completely different server. My question is, can any action in the iframe (such...
1
by: Marcin Okraszewski | last post by:
Hi, I would like to include one page inside an other page, almost like a IFRAME does it. The problem is that I would like the included part to occupy as much space as it needs, so it would be...
3
by: Hugh G. Johnson | last post by:
I have a knowledgebase (KB) system I installed into my existing dynamicly driven site. I used iFrame to grab the KB and place it in the content area of the page. This works great, but I realize now...
16
by: Mcginkel | last post by:
I am trying to find a way to load XHTML content in an Iframe. I use to do this in html by using the following code : var iframeObject = document.createElement("iframe");...
4
by: seans | last post by:
Hi, Is there some way from preventing the JavaScript code in a document loaded into an iframe from executing? I don't have access to the pages being loaded into the i-frame so I can't modify...
4
by: Richard St?en | last post by:
Hi! We are experiencing a problem with running an .aspx page inside an iframe. The .aspx page is loading perfectly the first time (on load), but when we try to interact/navigate within the .aspx...
2
by: Jeronimo Bertran | last post by:
Hi, I have a page with a very data intensive grid which needs to be automatically refreshed constantly if a change is detected. In order to not refresh the complete page so often, I created an...
21
by: matvdl | last post by:
I have a system that was originally developed in asp - the pages are saved in SQL (there are over 10,000 pages) and saved to a temp directory in the server when requested by a client. I have...
6
by: howa | last post by:
Since it is part fo the standard, why I always heard that we should avoid iframe? any comments? thanks.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.