wood burning stoves 2.0*
The moose likes Struts and the fly likes problem in struts applicaion using javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in struts applicaion using javascript" Watch "problem in struts applicaion using javascript" New topic
Author

problem in struts applicaion using javascript

deep pal
Greenhorn

Joined: Mar 19, 2008
Posts: 6
u are using struts 1.3 for our application in some of jsp we call javascript function
function submitAndresetFormWithEventonPress(url)
{
if(event.keyCode == 13 || event.which == 13){
document.forms[0].action=url;
document.forms[0].submit();
}

}
which is used for submittign action,now in this case it send two calls ..one which points to actual url and other one points to different wrong location..can anybody give suggection why it is happning how to resoved this problem....???...i am also using jstltag and custom libraries..
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If the focus is on a submit button when you press enter, then there will be two submits: one triggered by the submit button, and one triggered by the JavaScript.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in struts applicaion using javascript