homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Modify one par of a URL and redirect
javascript URL parse

 2:40 am on Nov 7, 2006 (gmt 0)

Hi guys,

I'm a rooking to Javascript and am stuck on this problem. People come to my site as
[mysite.com?submittosearch=yes?state=CA?city=Sacramento?...] ...

And so forth. But we have shut down mysite. I dont want to redirect without the query string: is it possible to direct that person to:

[mysite2.com?submittosearch=yes?state=CA?city=Sacramento?...] ...

I.E., keep the search string but change the domain? I cannot do this on the server side; I.E., it has to be done with javascript or something on the client side. Can anyone help?

Thank you!



 8:41 pm on Nov 7, 2006 (gmt 0)

related thread: [webmasterworld.com...]

Then once you have the url query you just have to change the location:

document.location.href = "new_link";

Good luck!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved