wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes linking to external js Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "linking to external js" Watch "linking to external js" New topic
Author

linking to external js

subhanair girish
Greenhorn

Joined: Aug 12, 2008
Posts: 13
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

Joined: Jun 22, 2005
Posts: 1526
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.


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

how did you test your js validation file?

please use Javascript Console in Firefox in case of error enquiry.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: linking to external js
 
Similar Threads
Javascript and the DispatcherServlet
Prototype Ajax.Request error - Function Expected Options
javascript include src path not right
form action problem
Linking to so many jquery plugins