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 <html:form> 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" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Tuesday, October 18, 2005 10:13 PM
Subject: form.submit() issue with <html:button>
I seem to have a issue using <html:button>'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 <html:submit> 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]