Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 3rd, 2003, 09:26 PM
Authorized User
 
Join Date: Jun 2003
Location: , , USA.
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
Reply With Quote
  #2 (permalink)  
Old August 4th, 2003, 06:26 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:41 PM.


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