Results 1 to 2 of 2

Thread: Jsp ?

  1. #1
    Join Date
    Jun 2004

    Jsp ?

    I'm leaning JSP as I go, and have a question for you guys............

    I would like to be able for a user to click a button, "Put On Vacation", and another JSP page, "PutOnVacation.jsp", be called without having the user actually being directed there. The JSP page being called only calls a method from another java class that runs a SQL statement. Currently I am using the lines:

    <form name="putOnVacation" action="PutOnVacation.jsp" method="post">
    <td id="vacationBox1">
    <input type="submit" value="Put On Vacation" onClick="putOnVacation()">

    Any ideas. I figure there is just some syntax I'm unaware of. Thanks......

  2. #2
    Join Date
    Jan 2004
    Melbourne, Australia
    Java Server Pages is a server-side language, so you cant execute JSP code from the client.

    Your calling a JavaScript function from the onclick event. JavaScript is not JSP, nor is it related in any way. So, you cannot call a JS function to execute a JSP script without sending something to the server.

    Does this make sense to you?

    Andrew Buntine.

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