views:

50

answers:

1

I have some javascript that looks like this:

$('.resultitem').click(function(event){
     alert('check this gets called');                      
     location.href='viewinfo/'+$(this).attr('rel');
});

this code works fine on my local machine but after uploading to the server it doesn't seem to get called at all. Can anybody help me understand why?

UPDATE: As mentioned below this was caused by a script error higher up. While debugging with firebug, I noticed on the server that in the net tab a GET jquery.cookie.js failes with a code of 406 not acceptable.

I had to rename to jquerycookie.js to keep this particular hosting provider happy. I did a little more research and this could be due to the following:

"anything with .cookie. in it triggers an Apache mod_security warning, stopping the file from being served, effectively making this unable to work"