onclick to jsp

Discussion in 'Java' started by xx, Apr 11, 2004.

  1. xx

    xx Guest

    I have a html page in which there is a <Submit>. Once the user clicks
    the button, it should go to a jsp page. I am thinking about something
    like:

    <html>
    ....
    <form>
    ....
    <input type="submit" name="..." value="..."
    onclick="http://localhost:8080/myjsp/myjsp.jsp">

    </form>
    </html>

    Is this right?

    Thanks,

    xx
     
    xx, Apr 11, 2004
    #1
    1. Advertising

  2. xx

    Guest

    onClick="location.href='http://localhost:8080/myjsp/myjsp.jsp'"
    onClick="location.href='http://localhost:8080/myjsp/myjsp.jsp'"

    need to change input type to button
    ordtherwise...
    Have a good day.
    peace.
     
    , Apr 11, 2004
    #2
    1. Advertising

  3. xx

    Sudsy Guest

    xx wrote:
    > <html>
    > ...
    > <form>
    > ...
    > <input type="submit" name="..." value="..."
    > onclick="http://localhost:8080/myjsp/myjsp.jsp">
    >
    > </form>
    > </html>
    >
    > Is this right?


    It's more generally done like so:

    <form action="http://localhost:8080/myjsp/myjsp.jsp" method="...">
    ....
    <input type="submit" ... >
    </form>
     
    Sudsy, Apr 11, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    4,498
  2. savita
    Replies:
    5
    Views:
    2,851
  3. bob
    Replies:
    3
    Views:
    235
  4. Replies:
    2
    Views:
    278
  5. Replies:
    4
    Views:
    208
Loading...

Share This Page