• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to run js file with apache

 
Saurabh Naik
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I have written some code in javascript file.. and accessing this file through <script src=""> tag in html.. but its not working when I deploy it on apache server.

but when I write same code in html file withing <scritpt> tag its working perfectly. so is there any configuration I have to do on apache server for working with js files. (I am using apache server.. not apache tomcat)


Thanks
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the file being served?
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Special settiongs are not required, just check as the guru said - if the file's being served. The path in "src" could be the culprit.
 
Saurabh Naik
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes the file is serving.. cause its showing the other contents other than script tag includes.

and I dont thing the src could be culprit.. coz If I open same individual html.. not on server.. but simply double clicking on html file.. its giving me the correct results.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saurabh Naik wrote: coz If I open same individual html

Please use real words when posting to the forums. Abbreviations such as "coz" in place of "because" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic