Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Including external Javascript file in JSP- not working on Mozilla Firefox

  • 2 个回答
  • 1 人有此问题
  • 5 次查看
  • 最后回复者为 the-edmeister

more options

I have a JSP page which includes javascript file as below:

<script type="text/javascript" src="https://siteAddress/scripts/myJsFile.js"></script>

myJsFile.js has a method testFireFox()

There is a link on JSP which that calls this method.

 <a href="#" onClick="testFireFox()">Some Text...</a> 

As soon as i click on the link, nothing happens and this error appears on console:

Refrence Error: testFirefox() is not definedI tried giving the path for JS file in various ways but it did not help.

Note: This works absolutely fine in Internet Explorer.

I have not added Javascript to document.ready or onLoad event. It is simply been referred in <Head>

tag any pointers pls..
I have a JSP page which includes javascript file as below: <script type="text/javascript" src="https://siteAddress/scripts/myJsFile.js"></script> myJsFile.js has a method testFireFox() There is a link on JSP which that calls this method. <a href="#" onClick="testFireFox()">Some Text...</a> As soon as i click on the link, nothing happens and this error appears on console: Refrence Error: testFirefox() is not definedI tried giving the path for JS file in various ways but it did not help. Note: This works absolutely fine in Internet Explorer. I have not added Javascript to document.ready or onLoad event. It is simply been referred in <Head> tag any pointers pls..

所有回复 (2)

more options

I'am using FireFox 31.0

more options

This forum is intended for user support, not for web development issues. Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The contributors over there are more knowledgeable about web page development issues with Firefox. http://forums.mozillazine.org/viewforum.php?f=25 You'll need to register and login to be able to post in that forum.