What I really want to know is how to use <html:button> and still using onclick 
to call javascript to submit the form.

Martin Gainty <[EMAIL PROTECTED]> wrote:Good Morning Carl

excerpted from Craig:
The challenge with doing this is that the JSP tags run on the server (as the 
page is being generated), while the JavaScript runs on the client side. To 
integrate the two, you need your tags (and other JSP code) to dynamically 
generate the JavaScript functions themselves -- sort of having a program 
write a program -- so that the JavaScript is customized to your particular 
need on this particular page.

A very trivial example is the way that the tag deals with the 
"focus" attribute. If you specify it, a dynamically generated bit of 
JavaScript is created to set the input focus, which includes the name of the 
field you want initial focus assigned to.

html:submit (submit button class) is derived from same parent as html:form 
(javax.servlet.jsp.tagext.TagSupport)
so the characteristic of a server side Tag class(dynamically) generating 
JavaScript holds true

Does this answer your question?
Martin-

----- Original Message ----- 
From: "Carl Smith" 
To: "Struts Users Mailing List" 
Sent: Tuesday, October 18, 2005 10:13 PM
Subject: form.submit() issue with 


>I seem to have a issue using 's onclick. My value of onclick 
>is a javascript performing form.submit(), but I found out this is not 
>working. However if I chang my button to then the javascript 
>is working. Why this is the case? Thanks.
>
>
> ---------------------------------
> Yahoo! Music Unlimited - Access over 1 million songs. Try it free. 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



                
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

Reply via email to