aspose file tools*
The moose likes JSP and the fly likes JSP not calling JS file funtion 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 » Java » JSP
Bookmark "JSP not calling JS file funtion" Watch "JSP not calling JS file funtion" New topic
Author

JSP not calling JS file funtion

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
I gus

I have a simple Javascript (.js) file with some client validation for the registration details of users on my site.
The problem is, the JSP doesn't call the Javascript function on 'submit.

The JSP looks like this:


And the Javascipt file is under glassfish: <app>/<war>/javascript/reg_validation.js

Any help?

Cheers

KS
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

Src path for javascript seems ok. Are you getting any error on your browser (yellow exclamation mark under baseline left of your screen). Can you post your contents for js file ? Which browser are you using for this ?


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Is the JS file *in* the war?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

The URL for the script file is likely missing the context path.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Thanks for the help guys, check my 'stoopid' typo:

# password: <input type="text" name="password" id="pwd" value="" />


password & pwd?

 
Consider Paul's rocket mass heater.
 
subject: JSP not calling JS file funtion