The html:submit tag sets the submit name to "submit".

JavaScript gets confused when an object (your submit button) has the same name as a 
javascript method you are trying to call.

If you set the submit name to something else, like btnSubmit", it will work fine.

HTH,
    Pete



[EMAIL PROTECTED] wrote:

> Hi All,
>
> I have encountered the strange problem when I used Javascript to submit the
> form.
>
> 1. In my case, I have one hyperlink namely "Add Employee", when user clicks that
> hyperlink, I use Javacript for setting the value of one hidden variable and to
> submit the form subsequently.
>
> 2. In the same page, I also used Struts (html:submit ) tag for showing  submit
> button.
>
> The combination of 1 and 2 gives me JavaScript error, like  "Object doesn't
> support this property."
>
> If I avoid Struts(html:submit) tag and use normal HTML (input type="button") tag
> for showing button things work fine for me.
> Mean I don't get JavaScript error.
>
> Can anybody tell me how to overcome this situation??
>
> 
>----------------------------------------------------------------------------------------------------------------------------------------
>
> Regards,
> Sandeep

Reply via email to