RE: JavaScript Form/submit Function

2002-03-11 Thread Paul Idusogie



Thanks,

Paul Idusogie 
Technical Architect 
Consulting Services
Stellent Inc.
 Golden Triangle Drive
Eden Prairie, MN 55104
Desk: 952.656.2755
Fax: 952.903.2115
Email: [EMAIL PROTECTED]
website: http://www.stellent.com


-Original Message-
From: Satish Jeejula [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 2:48 PM
To: 'Struts Users Mailing List'
Subject: RE: JavaScript Form/submit Function



I had noticed the problem. This is how I made it work. The java script that
is invoked by pressing submit button returns 'true' or 'false'. The form
gets submitted only if the value of 'onclick' attribute is true.

I use  tag as following ..

 

 

The javascipt code is as follows ...


function validate(form)
{
  if(!isAnyCard(form.elements["cc_number"].value)){
  alert("Invalid Card number, please enter a valid number now.");
  return false;
  }
  else {
return true;
  }
}


Hope this helps.
Satish.

- Original Message -
From: "Guido Schmutz" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 1:20 PM
Subject: AW: JavaScript Form/submit Function


> Hello,
>
> I'm currently having the exact same problem. It's caused by the
>  button, which automatically assigns the name "submit" to
> the button. Therefore you have an object submit in your form an IE does
> not seem to recognize the submit() method on the form anymore. If you
> remove your  tag, your form would work perferctly.
>
> I'm not sure what the solution for the problem is and I'm still working
> on it.
> I've tried to put the  in a second form and that would
> work. Another way would be to not use the  tag and code the
> submit button manually (with a different name than submit). Unfortunatly
> it's not possible to pass a name to the  tag and I'm also
> not sure, if Struts uses the name "submit" internally.
>
> Any additional input would help me as well.
>
> Guido



--
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]>




RE: JavaScript Form/submit Function

2002-03-11 Thread Satish Jeejula


I had noticed the problem. This is how I made it work. The java script that
is invoked by pressing submit button returns 'true' or 'false'. The form
gets submitted only if the value of 'onclick' attribute is true.

I use  tag as following ..

 

 

The javascipt code is as follows ...


function validate(form)
{
  if(!isAnyCard(form.elements["cc_number"].value)){
  alert("Invalid Card number, please enter a valid number now.");
  return false;
  }
  else {
return true;
  }
}


Hope this helps.
Satish.

- Original Message -
From: "Guido Schmutz" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 1:20 PM
Subject: AW: JavaScript Form/submit Function


> Hello,
>
> I'm currently having the exact same problem. It's caused by the
>  button, which automatically assigns the name "submit" to
> the button. Therefore you have an object submit in your form an IE does
> not seem to recognize the submit() method on the form anymore. If you
> remove your  tag, your form would work perferctly.
>
> I'm not sure what the solution for the problem is and I'm still working
> on it.
> I've tried to put the  in a second form and that would
> work. Another way would be to not use the  tag and code the
> submit button manually (with a different name than submit). Unfortunatly
> it's not possible to pass a name to the  tag and I'm also
> not sure, if Struts uses the name "submit" internally.
>
> Any additional input would help me as well.
>
> Guido



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JavaScript Form/submit Function

2002-03-11 Thread dderry

Use the 'property' attribute of the submit tag to change the name that is
assigned to the submit button.

This in my jsp:  generated
this in the HTML: 

Dave D


- Original Message -
From: "Guido Schmutz" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 1:20 PM
Subject: AW: JavaScript Form/submit Function


> Hello,
>
> I'm currently having the exact same problem. It's caused by the
>  button, which automatically assigns the name "submit" to
> the button. Therefore you have an object submit in your form an IE does
> not seem to recognize the submit() method on the form anymore. If you
> remove your  tag, your form would work perferctly.
>
> I'm not sure what the solution for the problem is and I'm still working
> on it.
> I've tried to put the  in a second form and that would
> work. Another way would be to not use the  tag and code the
> submit button manually (with a different name than submit). Unfortunatly
> it's not possible to pass a name to the  tag and I'm also
> not sure, if Struts uses the name "submit" internally.
>
> Any additional input would help me as well.
>
> Guido



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JavaScript Form/submit Function

2002-03-11 Thread Kanoza, Douglas (NCI)

The solution is simple - don't use the  tag.  Use plain old
HTML, which allows you to give it a different name.
 
-Original Message-
From: Guido Schmutz [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 1:21 PM
To: Struts Users Mailing List
Subject: AW: JavaScript Form/submit Function
 
Hello,
 
I'm currently having the exact same problem. It's caused by the
 button, which automatically assigns the name "submit" to the
button. Therefore you have an object submit in your form an IE does not seem
to recognize the submit() method on the form anymore. If you remove your
 tag, your form would work perferctly.
 
I'm not sure what the solution for the problem is and I'm still working on
it. 
I've tried to put the  in a second form and that would work.
Another way would be to not use the  tag and code the submit
button manually (with a different name than submit). Unfortunatly it's not
possible to pass a name to the  tag and I'm also not sure, if
Struts uses the name "submit" internally.
 
Any additional input would help me as well.
 
Guido
-Ursprüngliche Nachricht- 
Von: Bettina Gaus 
Gesendet: Mo 11.03.2002 15.56 h 
An: '[EMAIL PROTECTED]' 
Cc: 
Betreff: JavaScript Form/submit Function
Hello,

i tried to use the "document.forms[0].submit()" function in the onchange
property of a "" tag,
but i allways received the error message: "The object does not support this
property or method". It must be the
submit() function, because i.e the "document.forms[0].length" property gives
a result.

Does anybody got the same problem or can anybody help me

Bettina


--
To unsubscribe, e-mail:    >
For additional commands, e-mail:  >



RE: JavaScript Form/submit Function

2002-03-11 Thread Brian Richards

Sounds like you have an element in your form named submit.  Check your
html and make sure none of your elements are named "submit".

bsr

-Original Message-
From: Bettina Gaus [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 9:57 AM
To: '[EMAIL PROTECTED]'
Subject: JavaScript Form/submit Function


Hello,

i tried to use the "document.forms[0].submit()" function in the onchange
property of a "" tag, but i allways received the error
message: "The object does not support this property or method". It must
be the
submit() function, because i.e the "document.forms[0].length" property
gives a result.

Does anybody got the same problem or can anybody help me

Bettina


--
To unsubscribe, e-mail:

For additional commands, e-mail:






--
To unsubscribe, e-mail:   
For additional commands, e-mail: