Eivo Posted January 11, 2007 Share Posted January 11, 2007 I haven't used VBScript much. What is the escape character for VBScript, like JavaScripts \ ? Link to comment Share on other sites More sharing options...
pulpfiction Posted January 11, 2007 Share Posted January 11, 2007 Guess escape character in VBScript in double quotes ( " )example:response.write("hi this is a ""test"" line")OR Response.Write "<select name=""id"">" Link to comment Share on other sites More sharing options...
Eivo Posted January 11, 2007 Author Share Posted January 11, 2007 Thank you ...Wait, another question...If I needed actual double quotes, would that be a series of 3 quote marks?ex: document.write("<input name=""author"" type=""text"" value=""" & variable & """ size=""50"" />") Link to comment Share on other sites More sharing options...
jesh Posted January 11, 2007 Share Posted January 11, 2007 "" would escape as a single ". So, if you needed double quotes, you'd have to use four: """". Link to comment Share on other sites More sharing options...
Eivo Posted January 11, 2007 Author Share Posted January 11, 2007 I'm sorry, I said double quotes but thats not what I meant. I meant having a quote before the end of the string quote, if I am making any sense.For Example:Say I want to write this string:The man said, "I like bananas!", before he left.In JavaScript it would be... Response.Write("The man said, \"" + statement + "\", before he left.") and in VBScript it would be... document.write("The man said, """ & statement & """, before he left.") Is that code right? Link to comment Share on other sites More sharing options...
pulpfiction Posted January 11, 2007 Share Posted January 11, 2007 For value attribute, you dont have use double quotes, try this. it works. and its response.write in vbscript and not document.writeresponse.write("<input name=""author"" type=""text"" value=" & variable & " size=""50"" />") Link to comment Share on other sites More sharing options...
Eivo Posted January 11, 2007 Author Share Posted January 11, 2007 Ah, thank you. Link to comment Share on other sites More sharing options...
pulpfiction Posted January 11, 2007 Share Posted January 11, 2007 To write this string:The man said, "I like bananas!", before he left. var1 = "I like bananas!"response.write("The man said, """ & var1 & """, before he left.") Link to comment Share on other sites More sharing options...
Eivo Posted January 11, 2007 Author Share Posted January 11, 2007 cools, thank you again, lol Link to comment Share on other sites More sharing options...
pulpfiction Posted January 11, 2007 Share Posted January 11, 2007 Glad I could help you.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now