Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    57
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.prepareStatement("Select * from importtimetable where month='"+monthNum+"'");
    %>
    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.

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    javascript runs only on the browser and jsps run only on the server...they don't run together...ever
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

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