Click to See Complete Forum and Search --> : I want to send sql variable to a javascript function


micmic2
06-24-2003, 02:26 PM
I want to send sql variable to a javascript function
when i send a one word string it works fine
<LI onclick=showhide(<%=(rs"id")%>)>click</li>
but when i send a whole sentence it does not work at all
<LI onclick=showhide(<%=rs("message")%>)>click</li>
any ideas who to solve this problem?
i tried to send it as cstr(rs("message")) and trim(rs("message"))
but nothing works

CrazyGaz
06-24-2003, 04:03 PM
I'm nit sure if this will be the problem but it is worth a try.

<LI onclick=showhide('<%=rs("message")%>')>click</li>

I inserted single quotes (')

micmic2
06-27-2003, 05:34 AM
I already tried the quotes (') ataff but it doesn't work