1
Mazarin
JavaScript only works when logged in
  • 2012/11/20 20:47

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


I have a site where I have a JavaScript (jquery.easing, jcarousellite, slider) slider on the front page. The only problem is that it only works for logged in users.

I've tried this theme on a couple of my other test sites (both 2.5.5), and it works for anonymous users in one site, but not on the other site. I just can't figure out what in the setup of the sites (they're on the same server btw) is different between the two so that it works in one but not the other.

Edit: It seems jQuery is not loaded for anonymous users, but I'm not sure why since it looks like it's being called in theme.html:

   <{
$xoops_module_header}>
   <
script src="<{$xoops_url}>/libraries/jquery/jquery.js" type="text/javascript">script>


Any ideas?

2
Mazarin
Re: JavaScript only works when logged in
  • 2012/11/20 21:33

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


OK, I fixed it by calling jQuery through this line instead:
<script src="<{$xoops_url}>/browse.php?Frameworks/jquery/jquery.js" type="text/javascript">script>


However, perhaps someone more knowledgeable than me could explain the proper way of handling this, so that I can avoid any similar problems in the future?

Login

Who's Online

260 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 260


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits