473,785 Members | 2,879 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2032
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=htmPag e2

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****@weinric hs.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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
3417
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
2166
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 page. Is ther any help? Thanks a lot.
5
4036
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 wrong frame. I know the frame name I have to use is "_main" but I dont know how to use it with Javascript. function search( strKey ) { var strSearch= document.forms(0).txtSearch.value; document ??? .location.href='ViewPage.aspx?SrchKey=' + strKey...
2
2043
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 a way for it to open the page in a new window. Thanks Mike
2
1706
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
2646
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 = "application/ms-word"; Response.AddHeader("Content-Disposition", "attachment;filename=word.doc"); When I open the page in IE shows a dialog to ask whether I want to open or save. It is ok. But when I click Open or Save button, I get an error message:
4
1371
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 visit that page and will not get an 'access denied' message. IOW, I'm looking for the implementation of the following function: Public Function CurrentUserCanOpenPage(ByVal TheURL As String) As Boolean
2
1645
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 window. Greets JPM
2
1067
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 index.aspx and we dnt have to nees Google.com/index.aspx Please suggest me
3
6692
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 placeholder.my master page code is below: <%@ Master Language="C#" AutoEventWireup="true" CodeFile="jm.master.cs" Inherits="jm" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10152
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7500
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.