Hi Carl,

Mind telling us the cause of your problem?

On 10/20/05, Carl Smith <[EMAIL PROTECTED]> wrote:
> Thank you Martin on this information. This issue was resolved. Basically 
> there was another error in my jsp that cause this issue. Now it is working 
> fine. Simply put <html:button> does support form.submit() when correctly code 
> in onclick.
>
> I will however have another issue with sturts validator when using 
> form.submit(), which I will initiate another topic.
>
> Thanks.
>
> Martin Gainty <[EMAIL PROTECTED]> wrote:
> Referencing
> http://struts.apache.org/api/org/apache/struts/taglib/html/BaseHandlerTag.html#triedJstlSuccess
>
> To quote the doc
> org.apache.struts.taglib.html.BaseHandlerTag
> Base class for tags that render form elements capable of including
> JavaScript event handlers and/or CSS Style attributes. This class does not
> implement the doStartTag() or doEndTag() methods. Subclasses should provide
> appropriate implementations of these.
>
> the underlying base class class of SubmitButton is in fact
> org.apache.struts.taglib.html.BaseHandlerTag which has an onClick event you
> can use
>
> then again why would your javascript function be calling
> JavaScriptFunction()
> { form.submit(); }
> when your submit logic is already processing the onClick event ?
>
> M-
> ----- Original Message -----
> From: "Carl Smith"
> To: "Struts Users Mailing List"
> Cc: "Struts Users Mailing List"
> Sent: Wednesday, October 19, 2005 3:45 PM
> Subject: Re: form.submit() issue with
>
>
> > What I really want to know is how to use and still using
> > onclick to call javascript to submit the form.
> >
> > Martin Gainty 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------
>  Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
>

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

Reply via email to