473,407 Members | 2,546 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,407 software developers and data experts.

Open --non-default page-- in iFrame

Hi All.

I have a web with the default startup page as : index.htm that contains
an iFrame.

The default page, that loads in the iFrame, when index.htm is loaded, is
htmPage1.htm

I want to be able hyperlink from a banner ad on a different site to show a
different page in the iFrame when the index.htm page opens.

For example, a user clicks on my banner ad ( on a different web site ) and
it opens my index.htm with htmPage3.htm loaded into the iFrame instead of
htmPage1.htm.

Any suggestions would be greatly appreciated.

Regards
DaveO
Jul 23 '05 #1
2 2001
Jc
DaveO wrote:
I have a web with the default startup page as : index.htm that contains
an iFrame.

The default page, that loads in the iFrame, when index.htm is loaded, is
htmPage1.htm

I want to be able hyperlink from a banner ad on a different site to show a
different page in the iFrame when the index.htm page opens.

For example, a user clicks on my banner ad ( on a different web site ) and
it opens my index.htm with htmPage3.htm loaded into the iFrame instead of
htmPage1.htm.


The preferable way would be to generate the page server side based on
the referrer property (the URL that the user is coming from, as sent by
their browser in the header information), at which point you could set
the src of the iframe as desired.

You can also access the referrer property through javascript, and then
set the src of the iframe through the DOM. Refer to:
http://msdn.microsoft.com/library/de...s/referrer.asp

Alternatively, assuming your banner ad sends one or more URL parameters
to your site when someone clicks on it, you could look for the presence
of those and set the iframe src accordingly. Refer to:
http://msdn.microsoft.com/library/de...ies/search.asp

Jul 23 '05 #2
Hi Jc

Thanks for the feedback.

I have eventually figured this out - Not sure if this is the best way, but
it works for me.

I have changed the hyperlink on my banner ad to include -->
?&gopage=htmPage2

Then in the index.htm page, I added javascript to extract the passed url and
break it down into an array.

Later in the html where the iFrame is created ( with it's default page ), I
have added javascript code to change the default page.

Regards
DaveO
---------------------------------------------------

"Jc" <go****@weinrichs.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
DaveO wrote:
I have a web with the default startup page as : index.htm that contains
an iFrame.

The default page, that loads in the iFrame, when index.htm is loaded, is
htmPage1.htm

I want to be able hyperlink from a banner ad on a different site to show a
different page in the iFrame when the index.htm page opens.

For example, a user clicks on my banner ad ( on a different web site ) and
it opens my index.htm with htmPage3.htm loaded into the iFrame instead of
htmPage1.htm.


The preferable way would be to generate the page server side based on
the referrer property (the URL that the user is coming from, as sent by
their browser in the header information), at which point you could set
the src of the iframe as desired.

You can also access the referrer property through javascript, and then
set the src of the iframe through the DOM. Refer to:
http://msdn.microsoft.com/library/de...s/referrer.asp

Alternatively, assuming your banner ad sends one or more URL parameters
to your site when someone clicks on it, you could look for the presence
of those and set the iframe src accordingly. Refer to:
http://msdn.microsoft.com/library/de...ies/search.asp
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mr. x | last post by:
Hello, I have IE 6.0. To open a page from the current page I use : window.open("anotherurl"), but I want to open with a specific size (width + height). How can I do that ? Thanks :)
11
by: Clare Hsiao | last post by:
Hi,everybody: How can I use window.open to Open a page in the center of screen? I know showModalDialog() can,but I have to run both in IE and NN, so I have to use window.open to open a new...
5
by: Kojak | last post by:
I have a own search engine in a intranet. It can be opened by the search button or with the target="_search". On the page is a Textbox and a button. The page works well, but just opens in the...
2
by: Mike Lambert | last post by:
I want to be able to open another web page in a new browser window from the one I am currently on? How do I accomplish this? I am currently just using the response.redirect method but can't find...
2
by: JezB | last post by:
How do I open a page in a panel (or any square area) within a parent page ? (ideally via c# code-behind module rather than javascript)
10
by: Ĺženol Akbulak | last post by:
Hi, I have a form page to print on my web application(asp.net). I want to show the page in WORD. I use that code in asp.net Page_Load event: Response.Clear(); Response.ContentType =...
4
by: Corno | last post by:
Hi all, How do I find out if the current visitor of my page has enough rights to open another page on the same server? I need this to show a link to that page only when the visitor can actually...
2
by: Jean Paul Mertens | last post by:
Hello all, Can someone tell me how to programmaly (in c# asp.net) open a page in a new browser window. I was playing with Response.Redirect but a can't tell the thing he has to open a new...
2
by: agarwalsunitadhn | last post by:
hi i want to know that how to create a home page that will open at the time of putting the site address only at the address bar. Like when we click the site Google.com then it open some page like...
3
by: lisles | last post by:
im working with asp.net 2.0 and im using master pages.i have a link to a pdf file...when i click on the link i want the pdf to open within the contentplaceholder.im using iframe within the content...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.