You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Marcelo Caldas - CCSC <mc...@ccsc.com> on 2001/12/21 21:42:41 UTC

Don't understand why?

Hi guys!

This is a question about javascripts only. Sorry bothering with questions outside Struts scope, but I'm a member of this list for quite a time and you have showed a good understanding on Java Script. That's why I took the liberty on sending this message.

Here's the question:
Why sometimes a javascript function can call document.myform.submit(); and sometimes it says that the object doesn't support such method?

Scenario:
I have a JSP that has a <SCRIPT> tag with two functions: both end with the submit() call.
Everything worked fine so far...

Now, In the same JSP I have a <jsp:include> tag, which has it's own <SCRIPT> tag with no submit() or anything like that. But the problem is that the two functions on the above JSP doesn't submit any more... IT does everything else, but doesn't submit giving me the error described above...

Any help is greatly appreciated.
Regards,
Marcelo.

Re: Don't understand why?

Posted by Rakesh <ay...@india.com>.
Do you have a submit button in your form thats named "submit" ? if so,
rename it to something else. This will solve your problem.

--Rakesh
ayilliath@india.com
www.ayilliath.8m.com

-------------------------------------------

----- Original Message -----
From: "Marcelo Caldas - CCSC" <mc...@ccsc.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Saturday, December 22, 2001 2:12 AM
Subject: Don't understand why?


Hi guys!

This is a question about javascripts only. Sorry bothering with questions
outside Struts scope, but I'm a member of this list for quite a time and you
have showed a good understanding on Java Script. That's why I took the
liberty on sending this message.

Here's the question:
Why sometimes a javascript function can call document.myform.submit(); and
sometimes it says that the object doesn't support such method?

Scenario:
I have a JSP that has a <SCRIPT> tag with two functions: both end with the
submit() call.
Everything worked fine so far...

Now, In the same JSP I have a <jsp:include> tag, which has it's own <SCRIPT>
tag with no submit() or anything like that. But the problem is that the two
functions on the above JSP doesn't submit any more... IT does everything
else, but doesn't submit giving me the error described above...

Any help is greatly appreciated.
Regards,
Marcelo.


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


Re: Don't understand why?

Posted by Ted Husted <hu...@apache.org>.
By default, the Struts <html:submit> tag will name the button "submit",
which conflicts with the JavaScript function by the same name. If you
are using the Javascript submit fuction, it is important to give the
submit button another name.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


Marcelo Caldas - CCSC wrote:
> 
> Hi guys!
> 
> This is a question about javascripts only. Sorry bothering with questions outside Struts scope, but I'm a member of this list for quite a time and you have showed a good understanding on Java Script. That's why I took the liberty on sending this message.
> 
> Here's the question:
> Why sometimes a javascript function can call document.myform.submit(); and sometimes it says that the object doesn't support such method?
> 
> Scenario:
> I have a JSP that has a <SCRIPT> tag with two functions: both end with the submit() call.
> Everything worked fine so far...
> 
> Now, In the same JSP I have a <jsp:include> tag, which has it's own <SCRIPT> tag with no submit() or anything like that. But the problem is that the two functions on the above JSP doesn't submit any more... IT does everything else, but doesn't submit giving me the error described above...
> 
> Any help is greatly appreciated.
> Regards,
> Marcelo.

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