Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2003, 09:26 PM
Authorized User
 
Join Date: Jun 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to natmaster Send a message via AIM to natmaster Send a message via MSN to natmaster
Default send a search url in a get value

i need to create some kind of script that will convert a url with get values (a search url) so it can be sent as a get value.

example:
url="http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=aeon+site%3Aaeonofdarkness.com";
url=convert(url);
location.replace("http://aeonofdarkness.com/otherstuff.php?url="+url);

this way i can send the url, using javascript, from one page to another. (the other page would reprocess it and turn it back into the original url)


i was hoping there was some function that did this to optimize things, i couldn't find one...

----------------------------
http://aeonofdarkness.com
__________________
----------------------------
Aeon of Darkness MUD - Free Online Roleplaying Game
http://aeonofdarkness.com
 
Old August 4th, 2003, 06:26 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

encodeURIComponent/decodeURIComponent will do it but they need a reasonably modern version of JavaScript, on IE then version 5.5, not sure if supported by Netscape et al. You could also try the older escape/unescape methods.



--

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send URL request to send sms via NowSMS deco BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 February 16th, 2008 02:45 PM
TO SEND Text message or URL through Clickatell hanusoftware ASP.NET 2.0 Professional 0 July 16th, 2007 04:11 AM
How to send Web Service request & response to url? gyandeosingh .NET Web Services 1 January 30th, 2006 04:21 AM
How to send an Outlook mail item to a URL haiying Access VBA 0 April 29th, 2005 08:08 AM
extract URL from Favorites (.URL Files) PhilHawks VB.NET 2002/2003 Basics 2 November 2nd, 2004 04:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.