• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javascript not working on the server

 
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I'm facing a problem with the javascript , when i'm in the preview mode the calendar javascript is working perfect , but when i run this jsp on the server (Tomcat) it's not working !! although i'm using another javascript codes but they are working perfect on the server !! only the calender code is not working
The javascript code in the jsp is : i put this in the Head tag .


Any advice ?

P.S : I can provide this jsp code if needed
 
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


preview mode ? is it kind of only HTML involved ?

<script type="text/javascript" src="js/calendar.js"></script>



Check if you have placed the js file in the correct location as mentioned. and use a browser plug ins to see if your js is loaded or thrown any error.
 
S Shehab
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Balu Sadhasivam wrote:

preview mode ? is it kind of only HTML involved ?

<script type="text/javascript" src="js/calendar.js"></script>



Check if you have placed the js file in the correct location as mentioned. and use a browser plug ins to see if your js is loaded or thrown any error.


i meant by "Preview mode" this is an option in eclipse when you develope jsp to see it without running in a server , i checked the location all fine @!!!
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you used a tool such as Fiddler or Firebug to see if the file loaded? 99% of the time, people link to the file wrong.

Eric
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the JSP FAQ to see how to use server-relative URLs. The page-relative you are using is almost guaranteed to cause problems of one type or another.
 
S Shehab
Ranch Hand
Posts: 493
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Check the JSP FAQ to see how to use server-relative URLs. The page-relative you are using is almost guaranteed to cause problems of one type or another.



Hi guys,

Ya there was something wrong in the server relative url , but when i fixed it , it doesnt work too , so i changed the js filename , then i tried again so it worked perfect !! so the problem was in: 1- the server relative url 2 - the js filename .


Thanks guys much for your help ...
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The file name should have no problem, if it did, sounds like you had a caching issue.

Eric
reply
    Bookmark Topic Watch Topic
  • New Topic