#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    1
    Rep Power
    0

    Unhappy Passing special characters to javascript functions


    I am trying to create a URL through Javascript function and then use that url to open a new window.

    I pass the location, arguments and values so as to form a url such as
    location?arg1=value1&arg2=value2.....

    When I try to pass a value as 'a_123%CDE_GHI%KL', the function receives the value as 'a_123ĶE_GHI%KL' .

    I have tried combinations of escape and escape before and after sending values to the function, but it does not work.

    Can someone help me with the right way to send these values to the function and thus
    a. form the correct url with escaped values
    b. retrieve the original unescaped value in the new window.
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    24
    It should be as simple as that escape before and unescape after. If it isn't working and you know what the special characters would be then you could change them to something like a 3 digit number, then convert them back in the new window.

IMN logo majestic logo threadwatch logo seochat tools logo