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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect snags using Javascript 2

Status
Not open for further replies.
do you *have to* use javascript to move location ? because a simple <a href> can do the trick ;-)
you can try to location.reload(true) AFTER having replaced the location, as it forces reload, maybe it'll change the url as well ... let me know ...
 
iza,

Problem is they would like an automatic redirect and the new page is index.htm of the other site. I can't insert a location.reload(true) on this page as it will always reload.

Thanks anyway.
gags
 
no it reloads only once, i've done so and i feared the same - but it didn't happen ! try it anyway, you have nothing to lose ...
i don't know if you can access the value displayed in the url bar with javascript ... maybe jaredn or some javascript expert knows ? i hope for you ;] !
 
you cannot change the value displayed in the rul bar, but maybe jsut try:

window.location=&quot;someurl&quot;

that works for me jared@aauser.com -
 
I have tried both of your suggestions but no luck.

thanks for your time,
gags
 
so now you're going to have a hard time trying to explain the client that it's either automatic redirection and a &quot;wrong&quot; url; or explicit redirection and the &quot;correct&quot; url

couldn't you do rediction thru your webserver instead of using (client side) javascript ?
 
yes it is in a frame actually. I tried top.location, on your suggestion, but no luck.

What about if I redirected to a blank page, no frames, on the target site and then redirected again to the index.htm of the target site (has frames)?

 
Thanks for this thread everyone .. I came looking with the same problem and your solution has now worked for me !!
Guess I owe you all a virtual beer too ..
Cheers
Di
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top