File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in struts applicaion using javascript" Watch "problem in struts applicaion using javascript" New topic

problem in struts applicaion using javascript

deep pal

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){

which is used for submittign action,now in this case it send two calls 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.

Consultant, Sima Solutions
Don't get me started about those stupid light bulbs.
subject: problem in struts applicaion using javascript
Similar Threads
problem using javascript
How to do Client-side validation in Javascript in Struts Form Submission.
Struts 2 <s:submit action > and javascript help
problem in struts application
Query String Problem