Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

http_referer

Status
Not open for further replies.

mochalova

MIS
Sep 20, 2007
15
0
0
US

My http-referer is coming up blank in IE when I open a JS popup window

I do need the referer value for another portion of code on the new popped up window.

Can anyone please let me know if I can use another method apart from cgi.http_referer?

Many thanks

 
I'm not sure what the problem is without seeing code but if you're using javascript to open a pop up, why not just pass the cgi.script_name variable to the javascript function?
 
Thank you for your response.

I notified the value of http_referer is blank in IE but shows in firefox. After spending a few minutes on google, I found out http_referer is not reliable as it can be tweaked and some browsers don't show it anyway.

So my question is instead of using cgi.Http_referer to show the value of the referring url, what other method is there?

Thanks
 
I would suggest you take the advice of alucidweb.

when you pass in the url of the window tro open in your popup, put?path=#CGI.SCRIPT_NAME#.

Then in your file which opens in your popup, you reference the variable with #URL.path#.

 
How exactly does SCRIPT_NAME tell Mochalova where the requestor is coming from?

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
A virtual machine ate my accounting data. I transferred it to a physical box, then I beat it to smithereens with a sledgehammer. I feel better.
 
<a href="javascript:popUp('<cfoutput>#cgi.script_name#</cfoutput>')">

will send the current page to the javascript function... from there you can have your javascript function take that page name and do whatever you want with it.. including sending it as a variable in the url of the popup window.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top