Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP not calling JS file funtion

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the JS file *in* the war?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64608
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The URL for the script file is likely missing the context path.
 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help guys, check my 'stoopid' typo:

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


password & pwd?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic