You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Amit Khurana <am...@vichara.com> on 2002/10/16 08:58:58 UTC

Fw: document.forms[0].submit() not working

----- Original Message ----- 
From: khurana_76@yahoo.com 
To: amit.khurana@vichara.com 
Sent: Wednesday, October 16, 2002 12:21 PM
Subject: Fwd: document.forms[0].submit() not working


 

 khurana_76@yahoo.com wrote: 

  Date: Tue, 15 Oct 2002 07:12:33 -0700 (PDT)
  From: 
  Subject: document.forms[0].submit() not working
  To: struts-user@jakarta.apache.org
  CC: khurana_76@yahoo.com


  Hi 

  I have just started using the struts. I am having  a multi form with three pages. First is having an image link to second page and second is having an image link to 3rd and finally 3rd is having the submit button.To retrieve the first page data i have written the code given below but I am getting the javascript error. Even though call to other functions like document.forms[0].reset() is working fine. Can sb tell me what is the cause.

  <html:form action="/addPayee"> 

  <a href='javascript:document.forms[0].submit();'>
     <html:img src="graphics/continue.gif" width="67" height="15"/>
     </a>

  </html:form>

  Can some one suggest what is the better way to implement such multi page form in the struts. Thanks in advance.

  amit khurana





------------------------------------------------------------------------------
  Do you Yahoo!?
  Faith Hill - Exclusive Performances, Videos, & more
  faith.yahoo.com




--------------------------------------------------------------------------------
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com

RE: document.forms[0].submit() not working

Posted by Andrew Hill <an...@gridnode.com>.
Do you have any fields or buttons etc... on the form that have the name or
id "submit".
If so these will shadow (hide) the submit function of the form object and
thus attempting to call form.submit() will give you an error as you are now
attempting to call an object that is not of the function type (functions in
javascript are objects to and exist as properties of their parent object in
the same way as other objects).

-----Original Message-----
From: Amit Khurana [mailto:amit.khurana@vichara.com]
Sent: Wednesday, October 16, 2002 14:59
To: struts-user@jakarta.apache.org
Subject: Fw: document.forms[0].submit() not working



----- Original Message -----
From: khurana_76@yahoo.com
To: amit.khurana@vichara.com
Sent: Wednesday, October 16, 2002 12:21 PM
Subject: Fwd: document.forms[0].submit() not working




 khurana_76@yahoo.com wrote:

  Date: Tue, 15 Oct 2002 07:12:33 -0700 (PDT)
  From:
  Subject: document.forms[0].submit() not working
  To: struts-user@jakarta.apache.org
  CC: khurana_76@yahoo.com


  Hi

  I have just started using the struts. I am having  a multi form with three
pages. First is having an image link to second page and second is having an
image link to 3rd and finally 3rd is having the submit button.To retrieve
the first page data i have written the code given below but I am getting the
javascript error. Even though call to other functions like
document.forms[0].reset() is working fine. Can sb tell me what is the cause.

  <html:form action="/addPayee">

  <a href='javascript:document.forms[0].submit();'>
     <html:img src="graphics/continue.gif" width="67" height="15"/>
     </a>

  </html:form>

  Can some one suggest what is the better way to implement such multi page
form in the struts. Thanks in advance.

  amit khurana





----------------------------------------------------------------------------
--
  Do you Yahoo!?
  Faith Hill - Exclusive Performances, Videos, & more
  faith.yahoo.com




----------------------------------------------------------------------------
----
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>