matching
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 posted this at 07:19 — 2nd December 2000.
He has: 4,048 posts
Joined: Aug 2000
try this
<html>
<body bgcolor="#ffffff" text="#000000" id=all>
<script language=javascript>
<!--
function Encode() {
URLencode.message2.value = escape(URLencode.message.value);
URLencode.message3.value = unescape(URLencode.message2.value);
}
//-->
</script>
<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.
fairhousing posted this at 07:33 — 2nd December 2000.
They have: 1,587 posts
Joined: Mar 1999
thx max,
unescape() was what i was looking for.
thx again!
Mark Hensler posted this at 08:20 — 2nd December 2000.
He has: 4,048 posts
Joined: Aug 2000
no problem, glad I could help
NSS posted this at 10:48 — 2nd December 2000.
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
Grandmaster posted this at 13:44 — 2nd December 2000.
They have: 677 posts
Joined: Mar 1999
NSS using the [ code ] [/ code ] boxes without spaces
NSS posted this at 14:14 — 2nd December 2000.
They have: 488 posts
Joined: Feb 2000
TESTING - <html>
<body bgcolor="#ffffff" text="#000000" id=all>
<script language=javascript>
<!--
function Encode() {
URLencode.message2.value = escape(URLencode.message.value);
URLencode.message3.value = unescape(URLencode.message2.value);
}
//-->
</script>
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.