Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-06-2006, 01:34 AM   PM User | #1
pedroponting
New Coder

 
Join Date: Mar 2006
Location: Australia
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
pedroponting is an unknown quantity at this point
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)
pedroponting is offline   Reply With Quote
Old 04-06-2006, 05:28 AM   PM User | #2
pedroponting
New Coder

 
Join Date: Mar 2006
Location: Australia
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
pedroponting is an unknown quantity at this point
fixed

I solved this in the end by using chr() function.
__________________
pp
-------------------------------------
"Laziness is the mother of invention" - Thomas Edison (not really)
pedroponting is offline   Reply With Quote
Old 04-09-2006, 12:47 AM   PM User | #3
miranda
Senior Coder

 
Join Date: Dec 2002
Location: Arlington, Texas USA
Posts: 1,062
Thanks: 4
Thanked 8 Times in 8 Posts
miranda is an unknown quantity at this point
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);"">")
miranda is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:39 AM.


Advertisement
Log in to turn off these ads.