Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Javascript redirection help needed
Old 09-09-2008, 05:23 AM Javascript redirection help needed
Skilled Talker

Posts: 85
Name: Ilyes Rhouma
Trades: 0
Hi,
I have a problem that I need to redirect from a page1, to a second one page2, and make that in page1 is the referral page.
I used window.location="http://localhost/url-rotator/link.html";
and this worked in firefox, in page2 i see that the referer page is page1, but in internet explorer, this don't work, does someone have an idea ?
__________________
Want a cheap and custom programmer or writer ?
Please login or register to view this content. Registration is FREE

Are you
Please login or register to view this content. Registration is FREE
? Start
Please login or register to view this content. Registration is FREE
free and earning money !
Please login or register to view this content. Registration is FREE
Ilyes is offline
Reply With Quote
View Public Profile Visit Ilyes's homepage!
 
 
Register now for full access!
Old 09-09-2008, 05:45 AM Re: Javascript redirection help needed
Average Talker

Posts: 25
Trades: 0
I test following code in ie7 and ff2.It runs good.

<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
setTimeout("window.location='http://www.google.com'",1000)
//-->
</SCRIPT>
</BODY>

It will be better if you can supply your code.

Last edited by softhink; 09-09-2008 at 05:50 AM..
softhink is offline
Reply With Quote
View Public Profile
 
Old 09-09-2008, 06:09 AM Re: Javascript redirection help needed
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
The script is not your problem.
More probably, IE is either configured not to send the referrer, or a firewall/security program is blanking the referrer value.

Remember that it's the browser that says "I'm coming from there", and it's not mandatory.
It's a data that you cannot be assured it will be present at each requests.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 09-09-2008, 12:05 PM Re: Javascript redirection help needed
Skilled Talker

Posts: 85
Name: Ilyes Rhouma
Trades: 0
I found it:
Code:
<form action="http://newurl.com/" method="get" id="form1">
</form>      
<script language="JavaScript"> 
     document.getElementById('form1').submit(); 
     </script>
This will work in all browsers.

Note: the script of softhink is also working but not in ie6, but this does.

Thank you anyway.
__________________
Want a cheap and custom programmer or writer ?
Please login or register to view this content. Registration is FREE

Are you
Please login or register to view this content. Registration is FREE
? Start
Please login or register to view this content. Registration is FREE
free and earning money !
Please login or register to view this content. Registration is FREE
Ilyes is offline
Reply With Quote
View Public Profile Visit Ilyes's homepage!
 
Reply     « Reply to Javascript redirection help needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19803 seconds with 12 queries