embeding javascript code within jsp code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swethak
    New Member
    • May 2008
    • 118

    embeding javascript code within jsp code

    hi,

    i have a javascript variable

    var monthNum and i assigned some value in javascript.Now i use that variable in jsp as

    <%
    pstatement2 = connection.prep areStatement("S elect * from importtimetable where month='"+monthN um+"'");
    %>
    In that where condition monthNum is jascript variable. I used like that i got a error.

    Could plz tell that correct syntax i have to use in that place.
    Last edited by swethak; Nov 27 '08, 06:21 AM. Reason: adding contents
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Javascript runs on the client (browser) while a jsp runs on the server side; the other party is simply not there when one party runs. It can't be done.

    kind regards,

    Jos

    Comment

    Working...