• Post Reply Bookmark Topic Watch Topic
  • New Topic

linking to external js

 
subhanair girish
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to write all my javascripts in an external js file.

But I am unable to make it work.

<script language="JavaScript" type="text/javascript" src="validation.js">

</script>

This is how I have written in my jsp page.

please help...
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by subhanair girish:

But I am unable to make it work.


what did you do & what is happening? where is your jsp and where is your js. Check your folder-structures and paths.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how did you test your js validation file?

please use Javascript Console in Firefox in case of error enquiry.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's likely that your page-relative URL is failing. Please see the JSP FAQ on resource URLs to see how to properly reference external resources in a JSP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!