Adding attribute to datagrid cell -
07-29-2005
, 01:40 PM
I am using the follwing code to add an attribute to a datagrid cell:
e.Item.Cells(0).Attributes.Add("onmouseover", _
"ShowToolTip('" & theName & _
"','" & theAddress & "','" & _
theCityStateZip & "','" & _
theProfile & "');")
e.Item.Cells(0).Attributes.Add("onmouseout", "HideToolTip();")
This code works the majority of the time but when the datagrid is rendered
the call to the javascript is split on two seperate lines if there is a long
address.
This causes a javascript unterminated string error, here is what was
generated on the client side:
<td nowrap="nowrap" onmouseover="ShowToolTip('Harold M Young','109 Layle
Ln - PO Box 1382
','Watkinsville, GA 30677','');" onmouseout="HideToolTip();">07/22/05
13:08:52</td><td nowrap="nowrap">WATKINSVL GA</td><td nowrap="nowrap">Web
Site 800#</td><td nowrap="nowrap">Answered</td><td nowrap="nowrap"> </td><td
nowrap="nowrap"> </td><td nowrap="nowrap" align="Center"><A
href=http://www.buehner-fry.info/NarrowcastChart/Recordings/13431/7067693208072205100844.wav><img
src=http://www.buehner-fry.info/NarrowcastChart/images/Speaker.gif width=16
height=16 border=0></A></td><td nowrap="nowrap">6</td><td
nowrap="nowrap"> </td><td nowrap="nowrap">(706) 769-3208</td>
Anyone have any ideas?
--
Mike Hollibaugh |