Try

<a href="javascript:myFormFunction('/servlet/ServletName','formName')>text
or image</a>


Then in the head of the document (or js include) put a function something
like:

<script>
function myFormFunction(theAction, theForm) {
    // custom cross platform function that gets an object..
    // create your own or take Dreamweaver's - MM_findObj or something like
that
    myFormObj = getObject(theForm) ;
    // set the action
    myFormObj.action = theAction;
    myForm.submit();
}
</script>


----- Original Message -----
From: "Bart R Schroder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 12:37 PM
Subject: Call to servlet from javascript


> Hi Everyone,
>
> Scenario: I'd like to make a call to a servlet via javascript.  I'd prefer
not
> to use the 'post' or 'get' methods in the <form> tag.
>
> I wouldn't bother you guys, but I can't find the javascript method for the
life
> of me.
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to