Results 1 to 4 of 4
  1. #1
    meghana is offline Member
    Join Date
    Mar 2010
    Posts
    9
    Rep Power
    0

    Default java script variables with jsp

    hi

    i want to use java script variables value in jsp code.

    actully i m taking value from html text box and at onLostfouce property insert that value in database.

    please give me solution of this problem.If there is any other solution then also tell me.Thanks.

    Megha

  2. #2
    Sno's Avatar
    Sno
    Sno is offline Senior Member
    Join Date
    Apr 2010
    Posts
    196
    Rep Power
    5

    Default

    Need more information on what your trying to do.

    So your inserting a value to a database, but you want to pass the value to a jsp to the database?

    Pass it as a parameter

    Receive it in your jsp like this
    Java Code:
    if (request.getParameter("Report") != "" || request.getParameter("Report") != null) {
    		String Report = request.getParameter("Report");
    }
    also remember, Javascript and java are two completely different languages.
    :rolleyes: ~ Sno ~ :rolleyes:
    '-~ B.S. Computer Science ~-'

  3. #3
    meghana is offline Member
    Join Date
    Mar 2010
    Posts
    9
    Rep Power
    0

    Default

    Thanks dear

    java script and jsp we use in same html file or not?

    megha

  4. #4
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default

    These are three different things. Html is a static markup language. As said by Sno, don't mix up jsp and java script. Even if you write the code in same page, execution happens in a complete different manner. Jsp part is executed at the server and what the client gets is the rendered html content. Client side java script is always executed at the client end.
    Swastik

Similar Threads

  1. run a matlab script from java
    By npoorni in forum Advanced Java
    Replies: 5
    Last Post: 02-11-2010, 03:32 PM
  2. How to call php script using Java
    By narik in forum New To Java
    Replies: 2
    Last Post: 01-22-2010, 05:08 PM
  3. Java script
    By kirtichopra2003 in forum Advanced Java
    Replies: 1
    Last Post: 12-04-2009, 07:55 PM
  4. java script
    By satti in forum Web Frameworks
    Replies: 0
    Last Post: 06-09-2009, 08:53 AM
  5. The lasted java script
    By silvia in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-07-2007, 05:44 AM

Posting Permissions

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