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

    Join Date
    Oct 2001
    Rep Power

    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.

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

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

IMN logo majestic logo threadwatch logo seochat tools logo