#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    15
    Rep Power
    0
    currently my HTML loads a servlet when the SUBMIT button is activated. I want a servlet to run when the page loads.
    Don't know much about Java or HTML - need advice on TAG to write at both ends (i.e within HTML and Servlet).

    cheers.....
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    35
    Rep Power
    14
    If the page has something like:

    <form method="post" action=(your servlet here) name="theForm">

    you can submit it at page load by making the body tag of the page :
    <body onLoad="document.theForm.submit()">

    I'm not sure what you mean by "TAG at both ends" - your servlet (as specified in the action of your <form> tag needs to have a doPost() method that handles the post.

    Success Ton
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    15
    Rep Power
    0
    cheers Ton!!

    worked peachy!

IMN logo majestic logo threadwatch logo seochat tools logo