View Full Version : nested quotes line throwing error

04-06-2006, 02:34 AM
Can someone tell me how to write this line so I don't get an error - I've tried various ways to nest the quotes, but I still get an error saying that an ")" is expected.

response.write("document.write('<form method=\"post\" action=\"message_send.asp?subject=" & Request.QueryString("subject") & "\" onsubmit=\"return preValidate(this);\">);")

It's kinda confusing I know. Is there any other way to feed the result of an ASP function into Javascript other than by getting ASP to write out the JS as above?

04-06-2006, 06:28 AM
I solved this in the end by using chr() function.

04-09-2006, 01:47 AM
if you are using VBScript as your server side language you don't use forward slash quote \" but use two quotes "" instead

response.write("<form method=""post"" action=""message_send.asp?subject=" & Request.QueryString("subject") & """ onsubmit=""return preValidate(this);"">")