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

    Join Date
    May 2003
    Location
    STL
    Posts
    13
    Rep Power
    0

    JavaScript calls to servlet


    Quick Q:
    Is it posibble for JavaScript to invloke a servlet or forms are the only way to invoke servlets?
  2. #2
  3. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    You can request a servlet in any manner that you would normally request an html document - javascript, link tag and form, to name a few.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    STL
    Posts
    13
    Rep Power
    0

    JavaScript calls to servlet


    So for example, can I call a servlet from an onclick event of a JS area object?
    Can u show me how I call the servlet ?
  6. #4
  7. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    Yes, you can call one from the onclick event in javascript. I am not sure what an area object is that you are referring to though.

    You would do this the exact same way you would request an html file. Do you know how to request an html file in the onclick event of an anchor tag (i.e., <a href=...)?
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    STL
    Posts
    13
    Rep Power
    0

    Thumbs up javascript calls servlet


    Yes, this helps. Thanks.

IMN logo majestic logo threadwatch logo seochat tools logo