This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes problem 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 » Engineering » HTML, CSS and JavaScript
Bookmark "problem using javascript" Watch "problem using javascript" New topic

problem 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....???...
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Well first off, that code should not run in all browsers.

Second is the form going to the original action in the form?

deep pal

Joined: Mar 19, 2008
Posts: 6
nops it is not either going to form is sending two with proper url othr with wrong url which execute first...
I agree. Here's the link:
subject: problem using javascript
Similar Threads
Query String Problem
problem in struts applicaion using javascript
Changing the target of a form
Struts 2 <s:submit action > and javascript help
problem in struts application