File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 60048
    
  65

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
 
Similar Threads
Can you post data from textfields to a URL without having a <form>
Quick question about reading a Bean reading a JSF inputLabel
how to keep register page data if register fails
validate form fields using javascript in struts
Can't get RequestDispatcher forward() method or response.sendRedirect() to work