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

Urlreferrer. Called from client side

Hi All,

I have a number of N applications with an address similar to
http://AnyURL/Page1.Aspx that call a page I'm working on, that has an
address similar to http://ADifferentURL/Page2.Aspx . "Page2.Aspx" is being
called from client code in "Page1.Aspx", by using a "window.open" command.
When I try to get the URLReferrer, to identify the caller, I get an empty
result. This doesn't happen if "Page2.Aspx" is called by a
Response.Redirect, for example, but I have no access at all to modify the
caller (Page1). I tried using "window.opener.name", on the client code for
Page2, but the string comes up empty. I also tried
"window.opener.document.nameOfObject", to read from objects that would allow
me to identify the referrer, but I get "Access denied".

What can I do on "Page2.Aspx" to identify the referrer? Remember I can't
change anything on the caller side (Page1.Aspx). I can only make changes on
"Page2.Aspx".

Thanks in advance for the help. Have a great day,

Frank
Jun 18 '07 #1
3 1528
If I am not mistaken, the *only* way you will get an http Referer is if the
requested page is from a clicked hyperlink. So, using window.open isn't going
to work.

Possibly if you use window.open from the onclick event of an A tag, that
might work.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"John Francisco Williams" wrote:
Hi All,

I have a number of N applications with an address similar to
http://AnyURL/Page1.Aspx that call a page I'm working on, that has an
address similar to http://ADifferentURL/Page2.Aspx . "Page2.Aspx" is being
called from client code in "Page1.Aspx", by using a "window.open" command.
When I try to get the URLReferrer, to identify the caller, I get an empty
result. This doesn't happen if "Page2.Aspx" is called by a
Response.Redirect, for example, but I have no access at all to modify the
caller (Page1). I tried using "window.opener.name", on the client code for
Page2, but the string comes up empty. I also tried
"window.opener.document.nameOfObject", to read from objects that would allow
me to identify the referrer, but I get "Access denied".

What can I do on "Page2.Aspx" to identify the referrer? Remember I can't
change anything on the caller side (Page1.Aspx). I can only make changes on
"Page2.Aspx".

Thanks in advance for the help. Have a great day,

Frank
Jun 18 '07 #2
Thank you. The problem is that I can't do nothing on the source side. I
don't have access to that. I am looking for a solution on the target side.
Anything I can do to identify who called Page2.Aspx

Thanks again,

Frank

"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:74**********************************@microsof t.com...
If I am not mistaken, the *only* way you will get an http Referer is if
the
requested page is from a clicked hyperlink. So, using window.open isn't
going
to work.

Possibly if you use window.open from the onclick event of an A tag, that
might work.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"John Francisco Williams" wrote:
>Hi All,

I have a number of N applications with an address similar to
http://AnyURL/Page1.Aspx that call a page I'm working on, that has an
address similar to http://ADifferentURL/Page2.Aspx . "Page2.Aspx" is
being
called from client code in "Page1.Aspx", by using a "window.open"
command.
When I try to get the URLReferrer, to identify the caller, I get an empty
result. This doesn't happen if "Page2.Aspx" is called by a
Response.Redirect, for example, but I have no access at all to modify the
caller (Page1). I tried using "window.opener.name", on the client code
for
Page2, but the string comes up empty. I also tried
"window.opener.document.nameOfObject", to read from objects that would
allow
me to identify the referrer, but I get "Access denied".

What can I do on "Page2.Aspx" to identify the referrer? Remember I can't
change anything on the caller side (Page1.Aspx). I can only make changes
on
"Page2.Aspx".

Thanks in advance for the help. Have a great day,

Frank

Jun 19 '07 #3
Aside from putting something unique to the link or page on the querystring, I
don't think so. There is either a referer, or there is not.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"John Francisco Williams" wrote:
Thank you. The problem is that I can't do nothing on the source side. I
don't have access to that. I am looking for a solution on the target side.
Anything I can do to identify who called Page2.Aspx

Thanks again,

Frank

"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:74**********************************@microsof t.com...
If I am not mistaken, the *only* way you will get an http Referer is if
the
requested page is from a clicked hyperlink. So, using window.open isn't
going
to work.

Possibly if you use window.open from the onclick event of an A tag, that
might work.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"John Francisco Williams" wrote:
Hi All,

I have a number of N applications with an address similar to
http://AnyURL/Page1.Aspx that call a page I'm working on, that has an
address similar to http://ADifferentURL/Page2.Aspx . "Page2.Aspx" is
being
called from client code in "Page1.Aspx", by using a "window.open"
command.
When I try to get the URLReferrer, to identify the caller, I get an empty
result. This doesn't happen if "Page2.Aspx" is called by a
Response.Redirect, for example, but I have no access at all to modify the
caller (Page1). I tried using "window.opener.name", on the client code
for
Page2, but the string comes up empty. I also tried
"window.opener.document.nameOfObject", to read from objects that would
allow
me to identify the referrer, but I get "Access denied".

What can I do on "Page2.Aspx" to identify the referrer? Remember I can't
change anything on the caller side (Page1.Aspx). I can only make changes
on
"Page2.Aspx".

Thanks in advance for the help. Have a great day,

Frank


Jun 19 '07 #4

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

Similar topics

24
by: Nancy Drew | last post by:
hi all i'm trying to keep users from being able to login to a site twice at the same time. everytime a user does a login, i stick their userID into an application scoped array. if they try to...
0
by: Jiong Feng | last post by:
Hi, Here is my problem: I created a try.htm on my server, which contains a link to the default.aspx page. if I use http://localhost/try.htm, and click the link, then in default.aspx, I could...
2
by: Yoyo | last post by:
Hi all! I am developing an intranet app and have a problem with the Request.UrlReferrer object. I use it to keep a "linkstack" of all pages visited on the app to let the user surf thru pages...
1
by: | last post by:
I've got \\root\folder\Page2.aspx that I want to controll access to, by establishing a rule that says "previous URL must be '\\root\folder\Page1.aspx' (which did password validation). The code...
7
by: Ivan Demkovitch | last post by:
Hi! Here is what I'm doing: I have Login.aspx with code to do forms authentification and I have this line at the end: Response.Redirect(Request.UrlReferrer.ToString()); I have other...
1
by: tony collier | last post by:
Hi I have this declaration on most of my pages for the UrlReferrer. String referrer=Request.UrlReferrer.ToString(); This works fine apart from when the user first visits the site on the...
6
by: MooreSmnith | last post by:
When I navigate to the next page using Response.Rediect("MyNextPage.aspx") current page Page_Load event is called. What I may wrongly understood is that post back will happen whenever there is any...
7
by: Aaron Prohaska | last post by:
Has anyone had any experience with Nortan Antivirus causing problems when trying to use Request.UrlReferrer? I am seeing in the Nortan Antivirus log that its blocking my page from loading because...
2
by: ad | last post by:
I have tree web page A.ASPX, B.ASPX and CheckPW.aspx There is a button in A.ASPX, the click of that button is redirect to B.ASPX .. I write a Page_Load event in b.aspx, if the Session is null...
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
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,...
0
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...
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...

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.