Wolfgang

You probably have a <html:submit> tag? Struts generates a button with a
name of 'submit' so JavaScript gets confused. It wasted so much of my time!

You need to give your submit button a different name - can't recall how to
do that right now because I stopped using the submit buttons and used links
instead

Rob Breeds





                                                                                       
                                                            
                    Wolfgang Frank                                                     
                                                            
                    <wolfgang.fran       To:     [EMAIL PROTECTED]        
                                                            
                    [EMAIL PROTECTED]>           cc:                                           
                                                            
                                         Subject:     Problem: JavaScript in 
StrutsForm                                                            
                    29/11/2001                                                         
                                                            
                    13:00                                                              
                                                            
                    Please respond                                                     
                                                            
                    to "Struts                                                         
                                                            
                    Users Mailing                                                      
                                                            
                    List"                                                              
                                                            
                                                                                       
                                                            
                                                                                       
                                                            




Hello there,

may someone help me please?

I tried to call a javascriptfunction from a Struts-Form. I need
to do this because I want to calculate values in another SELECT
box depending
on the choice of this one ... and because a value changed event
in a form doesn�t cause a submit ... i need this?!

And i can�t get it to work:

<html:form action="assignDocument.do" >
      <table>
        <tr>
          <td>Choose:</td>
          <td>
              <html:select property="typeId" size="1"
onchange='document.forms[0].submit()'>
                  <html:options collection="typeRefCodes"
property="refC" labelProperty="refT"/>
               </html:select>
          </td>
        </tr>

....


</html:form>

I get an javascript error that "submit" is not a function.

Does anybody have an idea. It works fine without the javascript
and everything seems to be configured properly.

Thanks in advance
Wolfgang

------------------------------------
Herr Dipl. Math. Wolfgang Frank
Email: [EMAIL PROTECTED]
------------------------------------




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





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

Reply via email to