Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2006
    Location
    Australia
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    nested quotes line throwing error

    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.

    Code:
    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?
    pp
    -------------------------------------
    "Laziness is the mother of invention" - Thomas Edison (not really)

  • #2
    New Coder
    Join Date
    Mar 2006
    Location
    Australia
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    fixed

    I solved this in the end by using chr() function.
    pp
    -------------------------------------
    "Laziness is the mother of invention" - Thomas Edison (not really)

  • #3
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    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);"">")


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •