BlackDog42
07-14-2006, 05:38 PM
I'm trying to redirect text into a ddrivetip from a sql server database using the following method:
InsertString = RT(LEFT(RS("longdesc"),700))
InsertString = REPLACE( InsertString, "/", "-")
InsertString = REPLACE( InsertString, "%", "p")
ToolString = "<table border=1 cellspacing=0>"
If RS("picture1") <> "" Then
ToolString = ToolString & "<tr><td><IMG SRC='img/" & RS("picture1") & "'><BR></td></tr>"
end if
ToolString = ToolString & "<tr><td><b><font face=Arial size=1>"
ToolString = ToolString & InsertString & "</font></b></TD></TR></TABLE>"
ToolString = REPLACE( ToolString, "'", "\'")
'ToolString = REPLACE( ToolString, "/", "-")
Response.Write "<INPUT TYPE=""checkbox"" NAME=""partCompare"" "
Response.Write "VALUE=""" & RS("part_id") & """> "
Response.Write "<A HREF=""products.asp?ID=" & RS("part_id") &""" onMouseover=""ddrivetip('"& ToolString &"' ,'white',
300)""; onMouseout=""hideddrivetip()"" BORDER=""0"">" & sProd & "</A></TD>"
The end result of the script generates several java errors on the internet explorer browser page. Some of the data that is being pulled in to the toolstring is being truncated due to the large amount of data. Most of the tooltips work, just a few for each page don't show up, and I get a java error "unterminated string constant". What am I doing wrong? I've already replace the tick marks with \'. I've just been guessing as to what other characters need to be replaced???
HELP..:)
InsertString = RT(LEFT(RS("longdesc"),700))
InsertString = REPLACE( InsertString, "/", "-")
InsertString = REPLACE( InsertString, "%", "p")
ToolString = "<table border=1 cellspacing=0>"
If RS("picture1") <> "" Then
ToolString = ToolString & "<tr><td><IMG SRC='img/" & RS("picture1") & "'><BR></td></tr>"
end if
ToolString = ToolString & "<tr><td><b><font face=Arial size=1>"
ToolString = ToolString & InsertString & "</font></b></TD></TR></TABLE>"
ToolString = REPLACE( ToolString, "'", "\'")
'ToolString = REPLACE( ToolString, "/", "-")
Response.Write "<INPUT TYPE=""checkbox"" NAME=""partCompare"" "
Response.Write "VALUE=""" & RS("part_id") & """> "
Response.Write "<A HREF=""products.asp?ID=" & RS("part_id") &""" onMouseover=""ddrivetip('"& ToolString &"' ,'white',
300)""; onMouseout=""hideddrivetip()"" BORDER=""0"">" & sProd & "</A></TD>"
The end result of the script generates several java errors on the internet explorer browser page. Some of the data that is being pulled in to the toolstring is being truncated due to the large amount of data. Most of the tooltips work, just a few for each page don't show up, and I get a java error "unterminated string constant". What am I doing wrong? I've already replace the tick marks with \'. I've just been guessing as to what other characters need to be replaced???
HELP..:)