zob Posted April 6, 2006 Share Posted April 6, 2006 does anyone know if there is a way to use quotation marks for html attributes when you're doing them in vb. the main way i'm wondering is how to use vb subs for stuff like the onclick event that you are making with the document.write ("...") line. Link to comment Share on other sites More sharing options...
dooberry Posted April 6, 2006 Share Posted April 6, 2006 I'm having the same problem as this guy but with Javascript.I thought you could use double quotes to indicate speechmarks within a string e.g. '' or "" but I can't get it to work.In my case though, it would be easier if anyone can tell me how to add a custom attribute to a control as this would get round the problem. Link to comment Share on other sites More sharing options...
scott100 Posted April 6, 2006 Share Posted April 6, 2006 You have to propery nest the quotes or use the backslash.puting single quotes inside double quotesEscaping special characters<script>document.write("<a href='http://www.google.com'>google</a><br />");document.write("<a href=\"http://www.google.com\">google</a>");</script>http://www.w3schools.com/js/js_special_characters.asp Link to comment Share on other sites More sharing options...
vinphetamin Posted April 7, 2006 Share Posted April 7, 2006 or <script language="vbscript"><!--document.write("<a href="&chr(34)&"http://www.google.com"&chr(34)&">Google</a>")--></script><%=chr(34)%> 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