#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    24
    Rep Power
    0

    Javascript Help...


    I have a select list with an onChange event and I'm having problems with it. The option value contains strings that can have double quotes escaped with a \. The option values are surround by double quotes:

    <option value="This is a \"test\".">Test</option>

    For some reason the one with the escaped double quotes return an error when the onChange event is triggered. It looks as though the doubel quotes are not escaped correctly. Am I escaping the double quotes corretly?? I have the same problem when I tried to surround the option value with single quotes because some of the values contain single quotes.

    Thanks...
  2. #2
  3. No Profile Picture
    :: cerebralshock ::
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    Everywhere & nowhere.
    Posts
    133
    Rep Power
    12
    Try using single quote marks instead of double ones. JavaScript can be picky at times...

IMN logo majestic logo threadwatch logo seochat tools logo