www.webdeveloper.com
Results 1 to 3 of 3

Thread: I want to send sql variable to a javascript function

  1. #1
    Join Date
    Jun 2003
    Posts
    9

    Question I want to send sql variable to a javascript function

    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

  2. #2
    Join Date
    Feb 2003
    Posts
    98
    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 (')

  3. #3
    Join Date
    Jun 2003
    Posts
    9
    I already tried the quotes (') ataff but it doesn't work

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles