Bubble tooltip single quote
Posted:
Thu Jul 26, 2007 8:16 pm
by mkfurlong
I am getting javascript error when trying to pass a single quote in the showToolTip function. I have tried a number of combinations of single quotes inside the text but it always throws a script error. Example..
<a href="#" onmouseover="javascript:showToolTip(event,'You're funny looking');return false;" onmouseout="javascript:hideToolTip();">Comments</a>
Any help would be greatly appreciated.
Thanks, Mark
clean data
Posted:
Thu Jul 26, 2007 8:48 pm
by mkfurlong
Never mind I found a cleandata function I wrote earlier that I was able to clean up the double and single quotes. Here is the VB function.
Function CleanData(myData)
If inStr(1,myData,vbcrlf) > 0 Then
myData=Replace(myData,vbcrlf,"")
End If
If inStr(1,myData,"'") > 0 Then
myData=Replace(myData,"'","’")
End If
If inStr(1,myData,"""") > 0 Then
myData=Replace(myData,"""", """)
End If
CleanData=myData
End Function