File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion 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: 15385
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
jQuery in Action, 3rd edition