Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Quote Help

Reply
Thread Tools

Quote Help

 
 
scott
Guest
Posts: n/a
 
      07-20-2005
I'm trying to get my double quotes correct in LISTING 1. Can someone correct
the quotes surrounding the sURL variable. Also, I'd appreciate it all of the
quotes were double quotes instead of single quotes. LISTING 2 just shows the
code working with a hard-coded url. Thanks for any help.


LISTING 1: (causes js unterminated string)

'Response.Write ("<input type=button value=""Continue&nbsp;&gt;&gt;""
onclick='javascript:document.location=" & sURL & ";""'></td></tr></table>")



LISTING 2: (Works)
Response.Write ("<input type=button value=""Continue&nbsp;&gt;&gt;""
onclick=""javascript:document.location='calendar_a dmin.asp';""'></td></tr></table>")


 
Reply With Quote
 
 
 
 
Aaron Bertrand [SQL Server MVP]
Guest
Posts: n/a
 
      07-20-2005
> 'Response.Write ("<input type=button value=""Continue&nbsp;&gt;&gt;""
> onclick='javascript:document.location=" & sURL &
> ";""'></td></tr></table>")


Response.Write "<input type=button value='Continue &gt;&gt;'
onclick='javascript:location.href=""" & sURL & """;'></td></tr></table>"

Or to make it easier to follow,

sURL = """" & sURL & """"

Response.Write "<input type=button value='Continue &gt;&gt;'
onclick='javascript:location.href=" & sURL & ";'></td></tr></table>"

Or just call a function in the onclick handler and dump the URL into the
function.

Response.Write "<input type=button value='Continue &gt;&gt;'
onclick='go();'></td></tr></table>"
%>
<script>
function go()
{
location.href="<%=sURL%>";
}
</script>

A


 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem: neither urllib2.quote nor urllib.quote encode the unicodestrings arguments Valery Khamenya Python 3 10-05-2008 10:16 AM
Quote-Dot-Quote Operator kvnsmnsn@hotmail.com C++ 6 06-14-2008 11:34 PM
Datagrid on load; replace all double single quote to single quote to display to user Eric Layman ASP .Net 3 04-14-2007 07:16 AM
replacing strange quote with standard quote Stimp ASP .Net 2 09-20-2006 10:01 AM
Single Quote Versus Double Quote In A href link knee-dragger@hotmail.com HTML 3 06-13-2006 12:42 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57