Re: Javascript form Submit

2002-11-05 Thread Rajesh Kalluri Kalluri
Try this, also do you have more than one form on the jsp.

function setAction()
{
document.form.action.value="clearPager.do?action=clearPager";
document.form.submit()
return true;
}

I have my button tag as follows:



>>> [EMAIL PROTECTED] 11/05/02 07:31AM >>>

Hi,
  I have a button and am using a Javascript to submit the form.
My javascript is as follows:
function setAction()
{
document.form.action.value="clearPager.do?action=clearPager";
document.form.submit;
}

I have my button tag as follows:


For some reason when I click the button,the form is not getting to my action 
class.It gets to my javascript but not to my action class.Can anybody help 
me with this.

thanks in advance,
Kavitha

_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 


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



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




RE: Javascript form Submit

2002-11-05 Thread Joe Latty

try document.forms[0].submit();

-Original Message-
From: Kavitha ranga [mailto:kavitharanga@;hotmail.com]
Sent: Tuesday, 5 November 2002 11:31 PM
To: [EMAIL PROTECTED]
Subject: Javascript form Submit



Hi,
  I have a button and am using a Javascript to submit the form.
My javascript is as follows:
function setAction()
{
document.form.action.value="clearPager.do?action=clearPager";
document.form.submit;
}

I have my button tag as follows:


For some reason when I click the button,the form is not getting to my action
class.It gets to my javascript but not to my action class.Can anybody help
me with this.

thanks in advance,
Kavitha

_
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Javascript form Submit

2002-11-05 Thread Kavitha ranga

Hi,
 I have a button and am using a Javascript to submit the form.
My javascript is as follows:
function setAction()
{
   document.form.action.value="clearPager.do?action=clearPager";
   document.form.submit;
}

I have my button tag as follows:


For some reason when I click the button,the form is not getting to my action 
class.It gets to my javascript but not to my action class.Can anybody help 
me with this.

thanks in advance,
Kavitha

_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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



RE: causes errors with javascript form submit

2002-05-22 Thread Steel, Toby

I think this is a result of browser confusion between an 
element named 'submit' (the element produced by an html:submit 
without a property attribute)
and the function form.submit();
When using html:submit always specify a property.
Then you can have a named request parameter to process.

Interestingly, if you use html:cancel you may not specify a property
or it ceases to be cancel button (overriding validation).
One can specify a value, but then that value appears on the button
which is inconvenient for internationalized sites.

We ended up using custom tags that create  elements
that use onsubmit to add innerHTML to the form.
The innerHTML added is a hidden input named with the Struts
cancel property and given a value picked up in our parent action class
and targeted to a list of common forward names: 'back' 'cancel' 'home'
etc. 

Toby Steel

-Original Message-
From: Gary Bartlett [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 3:17 PM
To: StrutsUser Maillist
Subject:  causes errors with javascript form submit


Just curious - does anybody use the html:submit tag,
or do folks generally just use the standard input
type=submit tag.  

The reason I ask is that html:submit does not allow
you to  specify the name of the button - and as a
result all buttons generated with that tag are named
'submit'.  

This has the effect of returning an error if you try
to use javascript to submit your form (via
this.form.submit() ) - which can be a real PITA to
debug.

Gary Bartlett

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
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: causes errors with javascript form submit

2002-05-22 Thread Gary Bartlett

Thanks, I didn't realize that property translated into
the name attribute. 

GB
--- Sri Sankaran <[EMAIL PROTECTED]> wrote:
> Whatever you set the 'property' attribute of the
> html:submit is translated to the 'name' attribute of
> the resulting  tag.
> 
> Sri
> 
> -Original Message-
> From: Gary Bartlett
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 22, 2002 3:17 PM
> To: StrutsUser Maillist
> Subject:  causes errors with javascript
> form submit
> 
> 
> Just curious - does anybody use the html:submit tag,
> or do folks generally just use the standard input
> type=submit tag.  
> 
> The reason I ask is that html:submit does not allow
> you to  specify the name of the button - and as a
> result all buttons generated with that tag are named
> 'submit'.  
> 
> This has the effect of returning an error if you try
> to use javascript to submit your form (via
> this.form.submit() ) - which can be a real PITA to
> debug.
> 
> Gary Bartlett
> 
> __
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
> 
> --
> 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]>
> 


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




RE: causes errors with javascript form submit

2002-05-22 Thread Sri Sankaran

Whatever you set the 'property' attribute of the html:submit is translated to the 
'name' attribute of the resulting  tag.

Sri

-Original Message-
From: Gary Bartlett [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 3:17 PM
To: StrutsUser Maillist
Subject:  causes errors with javascript form submit


Just curious - does anybody use the html:submit tag,
or do folks generally just use the standard input
type=submit tag.  

The reason I ask is that html:submit does not allow
you to  specify the name of the button - and as a
result all buttons generated with that tag are named
'submit'.  

This has the effect of returning an error if you try
to use javascript to submit your form (via
this.form.submit() ) - which can be a real PITA to
debug.

Gary Bartlett

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




causes errors with javascript form submit

2002-05-22 Thread Gary Bartlett

Just curious - does anybody use the html:submit tag,
or do folks generally just use the standard input
type=submit tag.  

The reason I ask is that html:submit does not allow
you to  specify the name of the button - and as a
result all buttons generated with that tag are named
'submit'.  

This has the effect of returning an error if you try
to use javascript to submit your form (via
this.form.submit() ) - which can be a real PITA to
debug.

Gary Bartlett

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




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:
<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 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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




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:   <mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> >
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> >



AW: JavaScript Form/submit Function

2002-03-11 Thread Guido Schmutz

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:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>






winmail.dat
Description: application/ms-tnef

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


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




JavaScript Form/submit Function

2002-03-11 Thread Bettina Gaus

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: