Click to See Complete Forum and Search --> : Quoting within an alert...


dmason165
03-18-2003, 08:30 AM
Good morning to all,

Does anyone know how to use quotation marks within an alert message?

i.e. alert("Click "Yes" to accept. Click "No" to decline.")

to output:

Click "Yes" to accept. Click "No" to decline.

requestcode
03-18-2003, 08:35 AM
You need to what is referred to as escape the double quotes.
alert("Click \"Yes\" to accept. Click \"No\" to decline.")

The backslash in front of the double quotes will allow them to
be used in the alert.

dmason165
03-18-2003, 08:51 AM
Thank you! I searched everywhere on the Net for that one, to no avail.

Take care.

~dmason