Nico2011
asked on
URL.Encode/Decxode Generating Error
Hello,
I am using this piece of code to encode and decode a URL:
Encoding seems to work fine, however decoding doesn't, and generates this error:
Microsoft JScript runtime error '800a01b6'
Object doesn't support this property or method
/deps/top-regions-data.asp , line 116
Assistance appreciated!
Thank you
I am using this piece of code to encode and decode a URL:
<script language="javascript" runat="server">
URLDC = {
encode : function(s){return encodeURIComponent(s).replace(/'/g,"%27").replace(/"/g,"%22")},
decode : function(s){return decodeURIComponent(s.replace(/\+/g, " "))}
}
</script>
Encoding seems to work fine, however decoding doesn't, and generates this error:
Microsoft JScript runtime error '800a01b6'
Object doesn't support this property or method
/deps/top-regions-data.asp
Assistance appreciated!
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not to worry. Glad I could help. :)
ASKER
Thanks & have a good weekend :-)
ASKER