![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Dec 2001
Posts: 7,952
|
Javascript / PHP help needed ...
Is there any way via window.open to have it pass the referring url?
It seems to do it on some IE's and always in Firefox. So far I think my only way is to do a window.open and then have a gateway page but I didn't want to do that if I didnt have to. Thanks |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
|
If I"m understanding you right, couldn't you just append the current url to the new page you are opening, as a parameter?
__________________
Skype variuscr - Email varius AT gmail |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Dec 2001
Posts: 7,952
|
The page I am opening wants to make sure its coming from www.domain.com but if you use window.open that is blank for some reason in most browsers, firefox seems to pass it and some pc's here do too.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
|
If you rely on the browser, I think you are out of luck....
"The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted." Thus, I think the only 100% method would be to pass it as a parameter...it does mean the page being opened would have to accept and read that parameter though.
__________________
Skype variuscr - Email varius AT gmail |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
|
Note: If you pass it as a param, it loses any real use security-wise...as anyone could pass whatever info they want.
You'd have to use some encryption.
__________________
Skype variuscr - Email varius AT gmail |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Dec 2001
Posts: 7,952
|
thanks
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Jul 2004
Location: Denmark ICQ: 7880009
Posts: 2,203
|
you could do it with a pretty simple javascript..
put this in the popup window.. Code:
if(window.opener.document.location.href!="http://www.yourdomain.com/somepage.html") { alert("bahh.. you didn't come here from the correct page"); } |
![]() |
![]() ![]() ![]() ![]() ![]() |