Saturday, 18 August 2012

Body Onlode Script Loaded not working in Advanced Chrome Browser

Issue with SharePoint 2010 and Google Chrome where the scrolling and ribbon do not work sometimes.


My master page has the following

<body scroll="no" onload="if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();" class="v4master">

Since I am using jQuery anyway, I pulled the code from the body onload and instead used a jQuery document ready method to call this: 

<script type="text/javascript">
  $(document).ready(function(){
   if (typeof(_spBodyOnLoadWrapper) != 'undefined') 
   {
    _spBodyOnLoadWrapper();
   }
  });
</script>


(or)

 just simply past on bottom of the Master page

 <script type="text/javascript">
  _spBodyOnLoadWrapper();
 </script>

Anyway - this seems to have solved my issue. Please try and let me know if this works for you as well.

Tuesday, 14 August 2012

SharePoint SlideShow Using Java script



using this  code in master Page at where you want

 <a href="javascript:gotoshow()">
        <img src="images/1.jpg"" name="slide" border="0" width="300" height="375"></a>

      <script type="text/javascript">
        slideshowimages("images/1.jpg", "images/2.jpg", "images/3.jpg");
        slideshowlinks("#", "#", "#");

        //configure the speed of the slideshow, in miliseconds
        var Sspeed = 2000

        var Currentimage = 0
        var whichimage = 0
        function slideit() {
            if (!document.images)
                return
            document.images.slide.src = Simage[whichimage].src
            Currentimage = whichimage
            if (whichimage < Simage.length - 1)
                whichimage++
            else
                whichimage = 0
            setTimeout("slideit()", Sspeed)
        }
        slideit()
    </script>


After that Add this script to inside the Head tag in SharePoint Master Page.


    <script type="text/javascript">


var Simage=new Array()

var Slink=new Array()

function slideshowimages(){

for (i=0;i<slideshowimages.arguments.length;i++){

Simage[i]=new Image()

Simage[i].src=slideshowimages.arguments[i]

}

}




function slideshowlinks(){

for (i=0;i<slideshowlinks.arguments.length;i++)

Slink[i]=slideshowlinks.arguments[i]

}




function gotoshow(){

if (!window.winslide||winslide.closed)

winslide=window.open(Slink[Currentimage])

else

winslide.location=Slink[Currentimage]

winslide.focus()

}    </script>



That's it... it working all browser.


Monday, 13 August 2012

The expression Condition rules limited to 5?

          However when we try to add conditions for formatting I cannot add more than 5 Conditions? How can this be overcome? 

          You can overcome this by changing your last condition to "The expression" and use "and" or "or" as needed to create your compound condition.

So, for example,

xdUser:get-UserName() != "" and xdUser:get-UserName() != "" and xdUser:get-UserName() != ""

     then change the first drop down to "The expression" -- whatever your condition was will auto populate into the box for the expression.

KendoUI Chart using in AngularJS with Dynamic data

Here i'm going to do the KendoUI Chart using AngularJS  and getting dynamic data from angular services. First need to down-lode the r...