simple but not working!
Hi there
I'm trying to replace the ' character in a string and it's not working and I don't know why: here's what I'm using
<%=Replace(strProductShort, "'", "''")%>
and here it is in situ:
<a href="#" onClick="javascript:window.open('pop_product.asp?I mage=<%=strImage%>&Alt=<%=Replace(strProductShort, "'", "''")%>', '_product','scrollbars=no,resizable=no,width=600,h eight=402')">
the error message is:
Expected ')'
The reason it appears is because there is a ' character in the string input in the database i.e adam's
Not sure how to fix it if the above is not working.
thanks
Adam
|