[thelist] quote in variable

Daniel Kessler danielk at umd.edu
Tue May 15 12:32:54 CDT 2007


Oh I didn't realize I could escape the whole thing like that.

thanks!

> Am I missing something?  You don't need to know what text will be in
> the variable in your example.  You're window.confirm statement is
> syntactically correct as it is, what your variable contains or where
> it came from is irrelevant at this point.
>
> <script>
>   var the_publication = "\"I've got a quote in me!\"";
>   var ticket_num = 1;
>   var answer = window.confirm("Would you like to delete the
> publication" + the_publication + "; #" + ticket_num + "?");
> </script>


-- 

Daniel Kessler

College of Health and Human Performance
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
Phone: 301-405-2545
http://hhp.umd.edu






More information about the thelist mailing list