matching

They have: 1,587 posts

Joined: Mar 1999

i'm using js to parse a url.

http://www.example.com?need help

when the url has a space (blank) in it the parsed result is something like 20%, need20%help. any idea how i would correct this?

thx

Traffic-Website.com free traffic, affiliate programs, hosting, & domain names.
My Site got hacked, but i'm coming back?

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

try this

<html>
<body bgcolor="#ffffff" text="#000000" id=all>
&lt;script language=javascript&gt;
<!--
function Encode() {
URLencode.message2.value = escape(URLencode.message.value);
URLencode.message3.value = unescape(URLencode.message2.value);
}
//-->
&lt;/script&gt;
<form name=URLencode onSubmit="Encode(); return false;">
original: <input name=message type=text size=20><BR>
encoded: <input name=message2 type=text size=20><BR>
decoded: <input name=message3 type=text size=20><BR>
<input type=button value="Encode It!" onClick="Encode()">
</form>
</body>
</html>
'

you should be able to pass vars to unescapse() and get back the decoded URL.

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 1,587 posts

Joined: Mar 1999

thx max,

unescape() was what i was looking for.

thx again!

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

no problem, glad I could help
Laughing out loud

They have: 488 posts

Joined: Feb 2000

Hi Max,

If you don't mind sharing, I an just wondering how do you create the white box with the text inside it? Thanks.

Regards,
NSS

They have: 677 posts

Joined: Mar 1999

NSS using the [ code ] [/ code ] boxes without spaces

They have: 488 posts

Joined: Feb 2000

TESTING - <html>
<body bgcolor="#ffffff" text="#000000" id=all>
&lt;script language=javascript&gt;
<!--
function Encode() {
URLencode.message2.value = escape(URLencode.message.value);
URLencode.message3.value = unescape(URLencode.message2.value);
}
//-->
&lt;/script&gt;
'

THANKS!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.