Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Javascript doesn't work for the users except System admin. I checked in all files. And everyone can view the pages and sites.

How can I solve this?

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

        jQuery.fn.center = function () {
            this.css("position","absolute"); 
            this.css("top", ( $(window).height() - this.height() ) / 2 + $('#s4-workspace').scrollTop() + "px");    
            this.css("left", ( -300+$(window).width() - this.width() ) / 2 + $(window).scrollLeft() + "px");    
            return this;
        } 

        jQuery.fn.centerleft = function () {
            this.css("position","fixed");    
            this.css("top", ( $(window).height() - this.height() ) / 2 + $('#s4-workspace').scrollTop() + "px");    
            this.css("left", ( -300 + $(window).width() - this.width() ) / 2 + $(window).scrollLeft() + "px");    
            return this;
        } 

        $().ready(function () {
            $('.thumbnailyatay').mouseover(function() {
                $(this).next().center().show();
            }).mouseout(function() {
                $(this).next().hide();
            });

            $('.thumbnaildikey').mouseover(function() {
                $(this).next().centerleft().show();
            }).mouseout(function() {
                $(this).next().hide();
            });
        });
    </script>   
    <style type="text/css">
    .large {
 display:none;
 }



<a class="small" >
<xsl:attribute name="href">
<xsl:value-of select="@BigPicture"></xsl:value-of></xsl:attribute>
<img class="thumbnaildikey" alt="gallery thumbnail" style="width:88px;">
<xsl:attribute name="src">
<xsl:value-of select="@BigPicture"></xsl:value-of></xsl:attribute></img>
<img class="large" alt="gallery thumbnail" style="height:800px;width:568px">
<xsl:attribute name="src"><xsl:value-of select="@BigPicture">
</xsl:value-of></xsl:attribute></img>
</a>
share|improve this question
    
Could you provide code sample? –  Alexander Mar 21 '13 at 13:28
    
What you mean? Could you provide code sample? –  Salvatore Di Fazio Mar 21 '13 at 14:04
    
You need to post the actual javascript. –  Chloraphil Mar 21 '13 at 17:59
    
I add the codes to the question. Sorry for the late answers –  e.ozmen Mar 22 '13 at 6:08
    
My problem is changed. –  e.ozmen Mar 22 '13 at 7:24

2 Answers 2

Make sure you do not have any absolute urls in your javascript. Use server relative URLs only.

share|improve this answer
    
Yes, I did it . –  e.ozmen Mar 21 '13 at 15:26

Also ensure that where you are storing the JS files are accessible (site assests or wherever) by all users in terms of permissions etc...

Cheers,

S

share|improve this answer
    
I give read permission to site members. Nothing changed. –  e.ozmen Mar 22 '13 at 12:14
    
Can i ask where you have the file? –  Stephen Mar 22 '13 at 12:17
    
I found the reason. I removed src="" in the <script type="text/javascript" src="">. Thanks to all of you. –  e.ozmen Mar 22 '13 at 12:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.