Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting unterminated string error

Status
Not open for further replies.

samflex

IS-IT--Management
Jun 28, 2004
45
US
Can someone, please tell me why I am getting this unterminated string error message.
Thanks in advance:

Code:
<td class="name" width="10%" align="center" valign="top"><font size="-1"><a href="#" onClick="window.open('[URL unfurl="true"]http://t6/reports/traffi/displayCounts.asp?id=<%=RS("id")%>"><%=RS("id")%>','','width=500,height=200,scollbars,resizable=yes')">Enter</a></font></td>[/URL]
 
still getting same error message = unterminated string.
 
yes??

please give me the info, or I can't help you, what is displayed once the page has been served?

Is the a single or double quote in the record returned?
 
I had responded to the first question = Yes.

here is what i am getting:

<td class="name" width="10%" align="center" valign="top"><font size="-1"><a href="#" onClick="window.open('<a href="displayCounts.asp?id=<%=rscounts("id")%>">','','width=500,height=200,scollbars,resizable=yes')">Enter</a></font></td>
 
The reason you are getting the error is that this code is not being parsed by the server:

<%=rscounts("id")%>

and the " are signalling the end of the statement.

thats why I asked if you were running asp

You might also need to check the window.open function as that function will be expecting a url, not a anchored link statement

ie:

not
Code:
<td class="name" width="10%" align="center" valign="top"><font size="-1"><a href="#" onClick="window.open('<a href="displayCounts.asp?id=<%=rscounts("id")%>">','','width=500,height=200,scollbars,resizable=yes')">Enter</a></font></td>
but
Code:
<td class="name" width="10%" align="center" valign="top"><font size="-1"><a href="#" onClick="window.open('displayCounts.asp?id=<%=rscounts("id")%>','','width=500,height=200,scollbars,resizable=yes')">Enter</a></font></td>
('displayCounts.asp?id=<%=rscounts("id")%>','','width=500,height=200,scollbars,resizable=yes')">

 
I can't see any difference between what you suggested I use and I am currently using.
Either, it is still not working.

Thanks for your efforts, though.
 
Remove the piece that is in red:
Code:
<td class="name" width="10%" align="center" valign="top"><font size="-1"><a href="#" onClick="window.open('<a href="displayCounts.asp?id=<%=rscounts("id")%>[COLOR=red]">[/color]','','width=500,height=200,scollbars,resizable=yes')">Enter</a></font></td>

------------------------------------------------------------------------------------------------------------------------
"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair."
--Dou
 
If you are getting this after the page has parsed:

<td class="name" width="10%" align="center" valign="top"><font size="-1"><a href="#" onClick="window.open('<a href="displayCounts.asp?id=<%=rscounts("id")%>">','','width=500,height=200,scollbars,resizable=yes')">Enter</a></font></td>

then the asp has not been parsed, perhaps you should check this
 
I did that even before my first post.
I believe simonchristieis made similar suggestion.
I am still getting same error.
 
1) is the error occuring ont he server or is it a client scripting error?

2) have you viewed the output (view source) to see how the tag is being generated?

3) have you considered cleaning the code up and creating client script function to make this horrid line easier to debug and maintain?

___________________________________________________________________

onpnt.com
SELECT * FROM programmers WHERE clue > 0
(0 row(s) affected) -->faq333-3811

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top