Bart,

  I did find the source of this problem. If the submit button is named the
default property value of "submit", Javascript assumes that the button is being
referred to, not the function when the form.submit() request is processed. By
using the property tag and a value other than "submit", JavaScript is no longer
confused.

John Miaso

Bart Moberts wrote:

> Hello John
>
> >From: [EMAIL PROTECTED] (John Miaso)
> >Reply-To: [EMAIL PROTECTED]
> >To: [EMAIL PROTECTED]
> >Subject: document.testbean.submit is not a function
> >Date: Wed, 09 May 2001 08:27:24 -0600
> >
> >I've modified the html-select.jsp example to include the script:
> >
> ><SCRIPT>
> >function cbChanged() { document.testbean.cbSearch.value = "Search"
> >                        document.testbean.submit()
> >}
> ></SCRIPT>
> >
> >I'm setting a hidden property so that I can fill a select elements options
> >in
> >the Action peroform method based on the selection made in another select
> >element. When I do this I get the JSP error: document.testbean.submit is
> >not a
> >function.
>
> Isn't that a JavaScript error?
>
> I got this error when I tried to submit a form using a link. I removed all
> the regular submitbuttons and then it worked.
>
> >I get the same result if I try to send reset rather than submit. Is
> >Javascript
> >unaware of the submit button property? Is there a better way to approach
> >this?
> >
> >John Miaso
> >
>
> Grtz Bart
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Reply via email to