This is a migrated thread and some comments may be shown as answers.

RadRotator not working in FF,SAFARI AND CROME.

10 Answers 180 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
divya sahu
Top achievements
Rank 1
divya sahu asked on 11 Jan 2010, 01:21 PM
Hello ,
       I have created custom web part in asp.net for moss 2007 site.I am using RadRotator inside user control and loading it through RadAjaxPanel dynamically.It is working only in IE browser, It is not working in FF,crome 3.0 and safari 4.0.
       I am using Telerik 2009.3.1208.20 version of dlls.

Following code using for user control:

<asp:Panel runat="server" ID="demo">
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
            <td align="left" valign="top" scope="col">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td align="left" valign="top" scope="col" class="prismbannerTopleft">
                        </td>
                        <td align="left" valign="top" scope="col" class="prism_bannerTopMiddle">
                        </td>
                        <td align="left" valign="top" scope="col" class="prismbannerTopRight">
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="top" scope="col" class="prism_bannerMiddleleft">
                            &nbsp;</td>
                        <td align="left" valign="top" scope="col">
                            
                               <telerik:RadRotator ID="rrMonths" runat="server" AutoPostBack="false" OnItemDataBound="rrMonths_ItemDataBound"
                                ScrollDuration="2000">
                                
                                 <ItemTemplate>
                                    <table>
                                        <tr>
                                            <td valign="top">                                     
                                                <asp:Label ID="lblleft" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"LeftText")%>'></asp:Label>
                                            </td>
                                            <td style="width:7px">
                                            </td>
                                            <td valign="top">
                                             
                                                <asp:Image AlternateText="IMAGE" ID="Image1" runat="server" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"Image1")%>' Height="200" Width ="300"/>
                                               <asp:Image AlternateText="IMAGE" ID="Image2" runat="server" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"Image2")%>' Height="100" Width ="150"/>
                                              <asp:Image AlternateText="IMAGE" ID="Image3" runat="server" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"Image3")%>' Height="90" Width ="130"/>
                                                <asp:HiddenField ID="hdnid" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"Id")%>'/>
                                            </td>
                                            
                                            <td style="width:7px" >
                                            </td>
                                            <td valign="top">
                                                <asp:Label ID="lblright" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"RightText")%>'></asp:Label></td>
                                        </tr>
                                    </table>
                                </ItemTemplate>
                               
                               
                            </telerik:RadRotator>
                        </td>
                        <td align="left" valign="top" scope="col" class="prism_bannerMiddleRight">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td align="left" valign="top" scope="col" class="prism_bannerBottomleft">
                        </td>
                        <td align="left" valign="middle" scope="col" class="prismbannerBottomtext">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="72%" height="30" align="right" valign="middle" scope="col">
                                        <asp:Panel runat="server" ID="PanelNumber" Width="200" HorizontalAlign="Right">
                                        </asp:Panel>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td align="left" valign="top" scope="col" class="prism_bannerBottomRight">
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Panel>

Code behind (rotator.cs)
        UC_Rotator UCRotator;
        RadAjaxPanel _updatePanel;
protected override void OnInit(EventArgs e)
        { 
            base.OnInit(e);
            if (ScriptManager.GetCurrent(this.Page) == null)
            {
                ScriptManager managers = new RadScriptManager();
                this.Page.Form.Controls.AddAt(0, managers);
            }
            
        }
        protected override void OnLoad(EventArgs e)
        {
            try
            {
                base.OnLoad(e);
                _updatePanel = new RadAjaxPanel();
                _updatePanel.ID = "UpdatePanel1";
                this.Controls.Add(_updatePanel);
               Panel pnlsearch = (Panel)UCRotator.FindControl("demo");
                     _updatePanel.Controls.Add(pnlsearch);
               }
            catch (Exception ex)
            {
                 HttpContext.Current.Response.Write("Error :" + ex.Message);
            }
        }
private void EnsureUpdatePanelFixups()
        {
            if (this.Page.Form != null)
            {
                String fixupScript = @"_spBodyOnLoadFunctionNames.push(""_initFormActionAjax"");
                 function _initFormActionAjax()
                 {
                   if (_spEscapedFormAction == document.forms[0].action)
                   {
                     document.forms[0]._initialAction = 
                     document.forms[0].action;
                   }
                 }
                 var RestoreToOriginalFormActionCore = 
                   RestoreToOriginalFormAction;
                 RestoreToOriginalFormAction = function()
                 {
                   if (_spOriginalFormAction != null)
                   {
                     RestoreToOriginalFormActionCore();
                     document.forms[0]._initialAction = 
                     document.forms[0].action;
                   }
                 }";
                ScriptManager.RegisterStartupScript(this, typeof(Rotator), "UpdatePanelFixup", fixupScript, true);
            }
        }
        protected override void CreateChildControls()
        {
            try
            {
                if (BrowserDesignMode)
                {
                    //nothing
                }
                else
                {
                    base.CreateChildControls();
                    this.EnsureUpdatePanelFixups();
                    UCRotator = (UC_Rotator)this.Page.LoadControl(@"~/_CONTROLTEMPLATES/Smithsonian Controls/UC_Rotator.ascx");
                    UCRotator.ID = "UCRotator";
                    UCRotator.Rheight = this.Rheight;
                    UCRotator.Rwidth = this.Rwidth;
                    UCRotator.Itemheight = this.Itemheight;
                    UCRotator.Itemwidth = this.Itemwidth;
                    UCRotator.Home = this.Home;
                    UCRotator.FrameSize = this.FrameSize;
                    this.Controls.Add(UCRotator);
                    ViewState["demo"] = "true";
                    
                }
            }
            catch (Exception oEx)
            {
                throw oEx;
            }
            finally
            {

            }
        }


User control code behind(UC_rotator.ascx.cs)

protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (FrameSize == null)
                {
                    lblmsg.Text = "Configure Tool Part Properties";
                    demo.Visible = false;
                }
                else
                {
                    demo.Visible = true;
                    if (Home == "True")
                    {
                        rrMonths.RotatorType = Telerik.Web.UI.RotatorType.AutomaticAdvance;
                    }
                    else
                    {
                        rrMonths.RotatorType = Telerik.Web.UI.RotatorType.FromCode;
                    }
                    ListName = "Feature Content Media Gallary";
                    rrMonths.DataSource = GetPicDataTable();
                    rrMonths.DataBind();

                    DynamicCreateLinkButton();


                    if (FrameSize != null)
                    {
                        if (FrameSize == "Large")
                        {
                            demo.Width = 652;
                            rrMonths.Width = 652 - 41;
                            rrMonths.ItemWidth = 652 - 41;
                            rrMonths.Height = 220;
                            rrMonths.ItemHeight = 220;

                        }
                        else if (FrameSize == "Medium")
                        {
                            demo.Width = 406;
                            rrMonths.Width = 406 - 41;
                            rrMonths.ItemWidth = 406 - 41;
                            rrMonths.Height = 220;
                            rrMonths.ItemHeight = 220;

                        }
                        else if (FrameSize == "Small")
                        {
                            demo.Width = 376;
                            rrMonths.Width = 376 - 41;
                            rrMonths.Height = 220;
                            rrMonths.ItemWidth = 376 - 41;
                            rrMonths.ItemHeight = 220;
                        }
                    }
                   


                }
            }
           catch (Exception oEx)
            {
               HttpContext.Current.Response.Write("Page Load :" + oEx.Message);
            }
        }
private DataTable GetPicDataTable()
        {
            DataTable dt = new DataTable();
            DataRow dr;
            DataColumn dc = new DataColumn();
            dc.ColumnName = "Image1";
            dt.Columns.Add(dc);

            dc = new DataColumn();
            dc.ColumnName = "Image2";
            dt.Columns.Add(dc);

            dc = new DataColumn();
            dc.ColumnName = "Image3";
            dt.Columns.Add(dc);
            
            
            dc = new DataColumn();
            dc.ColumnName = "Id";
            dt.Columns.Add(dc);

            dc = new DataColumn();
            dc.ColumnName = "LeftText";
            dt.Columns.Add(dc);

            dc = new DataColumn();
            dc.ColumnName = "RightText";
            dt.Columns.Add(dc);
            try
            {
                   SPList oList;
                   SPSite tmpSite1 = SPContext.Current.Site;
                   SPSecurity.RunWithElevatedPrivileges(delegate()
                  {
                      using (SPSite oSite = new SPSite(SPContext.Current.Web.Url))
                      {
                          SPWebApplication webApplication = oSite.WebApplication;
                          string connectionInfo = System.Configuration.ConfigurationManager.AppSettings["SetWebAppIndex"];
                          int WebAppIndex = int.Parse(connectionInfo);
                          string TopLevelSiteUrl = webApplication.Sites[WebAppIndex].Url;
                          using (SPWeb oWeb = oSite.OpenWeb())
                          {
                              oWeb.AllowUnsafeUpdates = true;
                              
                                  oList = SPContext.Current.Web.Lists[ListName];
                                  SPQuery oQuery = new SPQuery();
                                  if ((TopLevelSiteUrl) == (SPContext.Current.Web.Url))
                                  {
                                     // oQuery.Query = "<Where><Eq><FieldRef Name='ApprovalStatus' /><Value Type='Choice'>Approved</Value></Eq></Where>";
                                      oQuery.Query = "<Where><Eq><FieldRef Name='HomeImag' /><Value Type='WorkflowStatus'>16</Value></Eq></Where>";
                                  }
                                  else
                                  {
                                      oQuery.Query = "<OrderBy><FieldRef Name='ID' /></OrderBy>";
                                  }
                                  SPListItemCollection oItems = oList.GetItems(oQuery);
                                  cnt = oItems.Count;
                                  TotalItemCount = oItems.Count;
                                  foreach (SPListItem oItem in oItems)
                                  {
                                      oItem["Preview"] = oWeb.Url + @"/" + oItem.File.ToString();
                                      string temp = Convert.ToString(oItem["Preview"]);
                                      finalPic = finalPic + "," + temp;
                                      string ids = Convert.ToString(oItem["ID"]);
                                      AdminId = AdminId + "," + ids;
                                      string temptxt = Convert.ToString(oItem["Message"]);
                                      Txt = Txt + "^" + temptxt;
                                      string Direction = Convert.ToString(oItem["Content Direction"]);
                                      dir = dir + "," + Direction;

                                  }
                              
                                  string[] stringList = new string[cnt];
                                  string[] IdList = new string[cnt];
                                 // string[] TextList = new string[cnt];
                                  char mychar = ',';
                                  char mychar1 = '^';
                                  string NewfinalString = finalPic.TrimStart(mychar);
                                  string[] batchlist = NewfinalString.Split(new Char[] { ',' });
                                  string NewfinalStringid = AdminId.TrimStart(mychar);
                                  string[] AdminIdList = NewfinalStringid.Split(new Char[] { ',' });
                                  string NewfinalText = Txt.TrimStart(mychar1);
                                  string[] TextList = NewfinalText.Split(new Char[] { '^' });
                                  string NewfinalDir = dir.TrimStart(mychar);
                                  string[] DirList = NewfinalDir.Split(new Char[] { ',' });
                                  for (int i = 0; i < cnt; i++)
                                  {
                                      dr = dt.NewRow();

                                      if (FrameSize != null)
                                      {

                                          if (FrameSize == "Large")
                                          {
                                              dr["Image1"] = (batchlist[i] + "");
                                              dr["Image2"] = "/_LAYOUTS/1033/IMAGES/Smithsonian Images/Feature Content/arrow_white.gif";
                                              dr["Image3"] = "/_LAYOUTS/1033/IMAGES/Smithsonian Images/Feature Content/arrow_white.gif";
                                          }
                                          else if (FrameSize == "Medium")
                                          {                                             
                                              dr["Image1"] = "/_LAYOUTS/1033/IMAGES/Smithsonian Images/Feature Content/arrow_white.gif";
                                              dr["Image2"] = (batchlist[i] + "");
                                              dr["Image3"] = "/_LAYOUTS/1033/IMAGES/Smithsonian Images/Feature Content/arrow_white.gif";
                                              
                                          }
                                          else if (FrameSize == "Small")
                                          {
                                             dr["Image3"] = (batchlist[i] + "");
                                             dr["Image1"] = "/_LAYOUTS/1033/IMAGES/Smithsonian Images/Feature Content/arrow_white.gif";
                                             dr["Image2"] = "/_LAYOUTS/1033/IMAGES/Smithsonian Images/Feature Content/arrow_white.gif";
                                             
                                          }

                                      }

                                     
                                      dr["Id"] = (AdminIdList[i] + "");
                                      if((DirList[i].ToString()) == "Left")
                                      {
                                          dr["LeftText"] = (TextList[i] + "");
                                          dr["RightText"] = "";
                                      }
                                      else
                                      {
                                          dr["LeftText"] = "";
                                          dr["RightText"] = (TextList[i] + "");
                                      }
                                     // dr["Text"] = (TextList[i] + "");
                                      dt.Rows.Add(dr);
                                 }
                           }
                      }
                   });
         
            }
            catch (Exception oEx)
            {
                HttpContext.Current.Response.Write("Get Pic Data Table :" + oEx.Message);
            }
            return dt;
        }

protected void SetInaitialItemIndex(object sender, EventArgs e)
        {
            try
            {
                LinkButton senderControl = sender as LinkButton;
              // senderControl.CssClass = "prismimagelinkSelected";
                string indexAsString = senderControl.Text; // Get the value - it should be a number; 
                int initialIndex = int.Parse(senderControl.Text);// Parse to int 
                initialIndex = initialIndex - 1;
                rrMonths.InitialItemIndex = initialIndex;// Assign the new value ;
                if (initialIndex > 4)
                {
                    SetNode(indexAsString);
                }
                else
                {
                    SetInNode(indexAsString);
                }
           }
            catch (Exception oEx)
            {
                HttpContext.Current.Response.Write("Set Inaitial Item Index :" + oEx.Message);
            }
       }
public void DynamicCreateLinkButton()
        {
            try
            {
                ImageButton imgleft = new ImageButton();
                imgleft.ImageUrl = "/_LAYOUTS/1033/IMAGES/Smithsonian Images/Feature Content/prism_left_arrow.jpg";
                imgleft.ImageAlign = System.Web.UI.WebControls.ImageAlign.Middle;
                imgleft.Click += new System.Web.UI.ImageClickEventHandler(SetInVisible);
                PanelNumber.Controls.Add(imgleft);
                Label lbldemo = new Label();
                lbldemo.Text = "   ";
                PanelNumber.Controls.Add(lbldemo);
                for (int i = 1; i <= TotalItemCount; i++)
                {
                    lnk = new LinkButton();
                    lnk.ID = "LinkButton" + i.ToString();
                    lnk.Text = i.ToString();
                    lnk.BorderWidth = 1;
                    lnk.Style.Add("text-decoration", "none");
                    lnk.ForeColor = System.Drawing.Color.White;
                    lnk.Style.Add("margin-right", "3");
                    lnk.Style.Add("margin-left", "3");
                    lnk.CssClass = "prismimagelink";
                    lnk.Click += new EventHandler(SetInaitialItemIndex);
                    PanelNumber.Controls.Add(lnk);
                    if (i > 5)
                    {
                        lnk.Visible = false;
                    }
                    if (i > 10)
                    {
                        lnk.Visible = false;
                    }
                    
                }
                Label lbldemo1 = new Label();
                lbldemo1.Text = "   ";
                PanelNumber.Controls.Add(lbldemo1);
               
                ImageButton imgright = new ImageButton();
                imgright.ImageUrl = "/_LAYOUTS/1033/IMAGES/Smithsonian Images/Feature Content/prism_right_arrow.jpg";
                imgright.Style.Add("vertical-align", "left");
                imgright.ImageAlign = System.Web.UI.WebControls.ImageAlign.Middle;
                PanelNumber.Controls.Add(imgright);
                imgright.Click += new System.Web.UI.ImageClickEventHandler(SetVisible);
            }
            catch (Exception oEx)
            {
                HttpContext.Current.Response.Write("Dynamic Create Link Button :" + oEx.Message);
            }
   }
        protected void SetVisible(object sender, EventArgs e)
        {
            try
            {
                if (TotalItemCount >= 5)
                {
                    if (TotalItemCount < 10)
                    {
                        int i = 6;
                        
                        while (i <= TotalItemCount)
                        {
                            PanelNumber.FindControl("LinkButton" + i.ToString()).Visible = true;
                            i++;
                            for (int j = 1; j <= 5; j++)
                            {
                                PanelNumber.FindControl("LinkButton" + j.ToString()).Visible = false;
                            }
                        }
                    }

                    else if (TotalItemCount >= 10)
                    {
                        int i = 6;
                       
                        while (i <= 10)
                        {
                            PanelNumber.FindControl("LinkButton" + i.ToString()).Visible = true;
                            i++;
                            for (int j = 1; j <= 5; j++)
                            {
                                PanelNumber.FindControl("LinkButton" + j.ToString()).Visible = false;
                            }
                        }
                    }

                }
            
            }
            catch (Exception oEx)
            {
                HttpContext.Current.Response.Write("Set Visible :" + oEx.Message);
            }
         
        }
        protected void SetInVisible(object sender, EventArgs e)
        {
            try
            {
                if (TotalItemCount >= 5)
                {

                    if (TotalItemCount < 10)
                    {
                        for (int i = 6; i <= TotalItemCount; i++)
                        {
                            PanelNumber.FindControl("LinkButton" + i.ToString()).Visible = false;
                        }
                        for (int j = 1; j <= 5; j++)
                        {
                            PanelNumber.FindControl("LinkButton" + j.ToString()).Visible = true;

                        }
                    }
                    else if (TotalItemCount >= 10)
                    {

                        for (int i = 6; i <= 10; i++)
                        {
                            PanelNumber.FindControl("LinkButton" + i.ToString()).Visible = false;
                        }
                        for (int j = 1; j <= 5; j++)
                        {
                            PanelNumber.FindControl("LinkButton" + j.ToString()).Visible = true;

                        }

                   }
                    
                }
            }
            catch (Exception oEx)
            {
                HttpContext.Current.Response.Write("Set In Visible:" + oEx.Message);
            }
           
        }
        private void SetNode(string Lnktext)
        {
            try
            {
                if (TotalItemCount >= 5)
                {
                    if (TotalItemCount < 10)
                    {
                        int i = 6;
                        while (i <= TotalItemCount)
                        {
                            PanelNumber.FindControl("LinkButton" + i.ToString()).Visible = true;
                            lnk = (LinkButton)PanelNumber.FindControl("LinkButton" + i.ToString());
                            if (Lnktext == lnk.Text)
                                lnk.CssClass = "prismimagelinkSelected";
                            else
                                lnk.CssClass = "prismimagelink";
                            for (int j = 1; j <= 5; j++)
                            {
                                PanelNumber.FindControl("LinkButton" + j.ToString()).Visible = false;
                            }
                            i++;
                        }
                    }

                    else if (TotalItemCount >= 10)
                    {
                        int i = 6;
                        while (i <= 10)
                        {
                            PanelNumber.FindControl("LinkButton" + i.ToString()).Visible = true;
                            lnk = (LinkButton)PanelNumber.FindControl("LinkButton" + i.ToString());
                            if (Lnktext == lnk.Text)
                                lnk.CssClass = "prismimagelinkSelected";
                            else
                                lnk.CssClass = "prismimagelink";
                           i++;
                            for (int j = 1; j <= 5; j++)
                            {
                                PanelNumber.FindControl("LinkButton" + j.ToString()).Visible = false;
                            }
                        }
                    }

                }
            }
            catch (Exception oEx)
            {
                HttpContext.Current.Response.Write("Set Node :" + oEx.Message);
            }
            
        }
        private void SetInNode(string Lnktext)
        {
            try
            {
                if (TotalItemCount >= 5)
                {

                    if (TotalItemCount < 10)
                    {

                        for (int i = 6; i <= TotalItemCount; i++)
                        {
                            PanelNumber.FindControl("LinkButton" + i.ToString()).Visible = false;
                        }
                        for (int j = 1; j <= 5; j++)
                        {
                            PanelNumber.FindControl("LinkButton" + j.ToString()).Visible = true;
                            lnk = (LinkButton)PanelNumber.FindControl("LinkButton" + j.ToString());
                            if (Lnktext == lnk.Text)
                                lnk.CssClass = "prismimagelinkSelected";
                            else
                                lnk.CssClass = "prismimagelink";
                        }
                    }
                    else if (TotalItemCount >= 10)
                    {

                        for (int i = 6; i <= 10; i++)
                        {
                            PanelNumber.FindControl("LinkButton" + i.ToString()).Visible = false;
                        }
                        for (int j = 1; j <= 5; j++)
                        {
                            PanelNumber.FindControl("LinkButton" + j.ToString()).Visible = true;
                            lnk = (LinkButton)PanelNumber.FindControl("LinkButton" + j.ToString());
                            if (Lnktext == lnk.Text)
                                lnk.CssClass = "prismimagelinkSelected";
                            else
                                lnk.CssClass = "prismimagelink";
                        }

                    }
                }

                else 
                {
                    for (int k = 1; k <= TotalItemCount; k++)
                    {
                        PanelNumber.FindControl("LinkButton" + k.ToString()).Visible = true;
                        lnk = (LinkButton)PanelNumber.FindControl("LinkButton" + k.ToString());
                        if (Lnktext == lnk.Text)
                            lnk.CssClass = "prismimagelinkSelected";
                        else
                            lnk.CssClass = "prismimagelink";
                    }
                }
            }
            catch (Exception oEx)
            {
                HttpContext.Current.Response.Write("Set In Node :" + oEx.Message);
            }
  }

please help me ASAP.
THANKS IN ADVANCE.

10 Answers, 1 is accepted

Sort by
0
Accepted
Lini
Telerik team
answered on 14 Jan 2010, 04:33 PM
Hello,

I looked through your code and noticed that you set the rotator type from the user control's code to

Telerik.Web.UI.RotatorType.FromCode

When this mode is set, the rotator will not move on its own and you have to use JavaScript to change its items. Since there is no JavaScript in your sample code, I assume that this might be the cause of the problem.

You might also wish to check the error consoles of the browsers and see if there are any JavaScript errors when you load the rotator with Ajax - this could also prevent it from initializing properly and its items will not scroll.

Greetings,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Scott Ponder
Top achievements
Rank 1
answered on 15 Feb 2010, 08:24 AM
I am having a problem with the RadRotator.  It works fine in IE7 and FireFox but does not show up in Safari or Chrome.  I am using the RadRotator in a multi-div page with many div's with their display set to none and then as I want to display the div, I change the display state.  The div that has the RadRotator is the main content div I call the home div and is displayed when the page loads.  But in Safari and Chrome it will not show up at all.

I am using library files 2009.3.1314.35

Here is the page:

 

 

 

<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Santa Clarita Valley Posse</title> 
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /> 
    <link rel="stylesheet" type="text/css" href="ScvPosse2.css" title="MainStyle" media="all" /> 
    <script language="javascript" type="text/javascript">  
        <!--  
        var CurDiv;  
        var CurDivName;  
 
        function SetStartInfo() {  
            var whichLayer = "Home";  
            var elem, vis;  
            CurDiv = GetLayer("Home");  
            CurDivName = "Home";  
            CurDiv.style.display = "block";  
 
            elem = GetLayer("PosseReq");  
            elem.style.display = "none";  
            elem = GetLayer("Reserve1");  
            elem.style.display = "none";  
            elem = GetLayer("Reserve2");  
            elem.style.display = "none";  
            elem = GetLayer("Training1");  
            elem.style.display = "none";  
            elem = GetLayer("Training2");  
            elem.style.display = "none";  
            elem = GetLayer("Civilian1");  
            elem.style.display = "none";  
            elem = GetLayer("Civilian2");  
            elem.style.display = "none";  
            elem = GetLayer("Civilian3");  
            elem.style.display = "none";  
            elem = GetLayer("Civilian4");  
            elem.style.display = "none";  
            elem = GetLayer("Links");  
            elem.style.display = "none";  
            elem = GetLayer("Contact");  
            elem.style.display = "none";  
            elem = GetLayer("SCVMap");  
            elem.style.display = "none";  
            elem = GetLayer("LHSMap");  
            elem.style.display = "none";  
            elem = GetLayer("Newsletter");  
            elem.style.display = "none";  
            elem = GetLayer("Donate");  
            elem.style.display = "none";  
        }  
 
        function GetLayer(layer) {  
            var elem;  
            if (document.getElementById) // this is the way the standards work  
                elem = document.getElementById(layer);  
            else if (document.all) // this is the way old msie versions work  
                elem = document.all[layer];  
            else if (document.layers) // this is the way nn4 works  
                elem = document.layers[layer];  
            return (elem);  
        }  
 
        function NextLayer(layer) {  
            if (layer != CurDivName) {  
                toggleLayer(CurDivName);  
                toggleLayer(layer);  
                CurDiv = GetLayer(layer);  
                CurDivName = layer;  
                  
            }  
        }  
          
        function toggleLayer( whichLayer )  
        {  
            var elem, vis;  
            if( document.getElementById ) // this is the way the standards work  
                elem = document.getElementById( whichLayer );  
            else if( document.all ) // this is the way old msie versions work  
                elem = document.all[whichLayer];  
            else if( document.layers ) // this is the way nn4 works  
                elem = document.layers[whichLayer];  
            vis = elem.style;  
            // if the style.display value is blank we try to figure it out here  
            if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)  
                vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';  
            vis.display = (vis.display==''||vis.display=='block')?'none':'block';   
        }     
        --> 
    </script>    
</head> 
<body onload="SetStartInfo();">  
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        <Scripts> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> 
        </Scripts> 
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
    </telerik:RadAjaxManager> 
    <div id="header">  
        <img src="Resources/ScvPosse.png" alt="Header" /> 
    </div> <!-- header --> 
    <div id="Sidebar">  
        <div id="NavList">  
            <ul> 
                <li><a href="javascript:NextLayer('Home');">Home</a></li>  
                <li><a href="javascript:NextLayer('PosseReq');">Posse Requirements</a></li>  
                <li><a href="javascript:NextLayer('Training1');">Training</a></li>  
                <li><a href="javascript:NextLayer('Reserve1');">Become a Reserve Deputy</a></li>  
                <li><a href="javascript:NextLayer('Civilian1');">Become a Civilian Volunteer</a></li>  
                <li><a href="javascript:NextLayer('Links');">Links</a></li>  
                <li><a href="javascript:NextLayer('Contact');">Contact Us</a></li>  
                <li><a href="javascript:NextLayer('Newsletter');">Newsletters</a></li>  
                <li><a href="javascript:NextLayer('Donate');">Donate</a></li>  
                <li><a href="#">Members Only</a></li>  
            </ul> 
        </div> 
    </div> <!-- Sidebar --> 
    <div id="MainContent">  
        <div id="Home">  
            <div id="Pictures">  
                <telerik:RadRotator   
                    ID="PicRotator"   
                    RotatorType="SlideShow" 
                    runat="server" 
                    Width="520" 
                    Height="520" 
                    ItemWidth="520" 
                    FrameDuration="5000" 
                    SlideShowAnimation-Type="Fade"   
                    DataSourceID="XmlPictureList">  
                    <ItemTemplate> 
                        <div id="PicDiv" style="<%# XPath("CssStyle") %>">  
                            <img id="Images" src="Images/<%# XPath("filename") %>" alt="<%# XPath("description") %>" /> 
                        </div> 
                    </ItemTemplate> 
                </telerik:RadRotator> 
                <asp:XmlDataSource ID="XmlPictureList" runat="server"   
                    DataFile="Pictures.xml">  
                </asp:XmlDataSource> 
            </div> <!-- Pictures --> 
        </div> <!-- Home --> 
        <div id="PosseReq">  
            <h1>Requirements for LASD Posse</h1> 
            <h3>In addition to the basic requirements for becoming a Reserve Deputy, the following are specific to becoming a member of the Posse:</h3> 
            <ul> 
                <li>Posse Members must have their own horse, trailer and tow vehicle.</li> 
                <li>Be willing to travel to all areas of the county if needed.</li> 
                <li>Must have a western or Australian saddle with horn.</li> 
                <li>Horse must have good temperament, good mannerism, ability to learn, be calm, stable, and get along with other horses.</li> 
                <li>Breed, sex, age, color, and size are not important.</li> 
                <li>No Stallions may be utilized.</li> 
                <li>Horse and rider must attent a 40 hour training class after academy graduation to enhance riding skills and gradually desensitize the horse to visual and auditory stimuli.</li> 
                <li>Attend additional training required for the various types of specialized details to be worked.</li> 
                <li>The "Horse always wins" philosophy provides training that develops a team based on trust.</li> 
            </ul> 
        </div> <!-- PosseReq --> 
        <div class="Content" id="Reserve1">  
            <h1>How to become a Reserve Deputy</h1> 
            <h4>Part 1</h4> 
            <p>Attend an Orientation Meeting at your local Sheriff's Station.  
               Santa Clarita Posse encompasses Sheriff's stations - Santa Clarita and Malibu/Lost Hills  
               Santa Clarita holds Orientation meeting on the second Thursday of each month at 7:00 p.m.   
               Malibu/Lost Hills holds their meeting on the last Tuesday of each month at 6:30 p.m.  
            </p> 
            <center> 
                <img id="Patch" class="Patch" src="Resources/Sworn Patch.gif" alt="Sworn Patch" /> 
                <br /> 
                <span class="Next">  
                    <href="javascript:NextLayer('Reserve2');"><img src="Resources/blank.gif" alt="Next" border=0 /></a>  
                </span> 
            </center> 
        </div> <!-- Reserve1 --> 
        <div class="Content" id="Reserve2">  
            <h1>How to become a Reserve Deputy</h1> 
            <img id="Patch1" class="Patch" src="Resources/Sworn Patch.gif" alt="Sworn Patch" /> 
            <h4>Part 2</h4> 
            <br /> 
            <h2>Orientation Meeting</h2> 
            <h3>Please allow 1.5 - 2 hours for this process.  You will complete the following:</h3> 
            <ul> 
                <li>Orientation - Description of the Reserve Company which includes Patrol, Search and Rescue, and the Posse.  Question and answer period.</li> 
                <li>Preliminary Questionaire.</li> 
                <li>Pre-Investigative Questionaire</li> 
                <li>Written Exam - a 24 question test which covers basic Mathematics and Reading Comprehension skills.</li> 
                <li>Written Exam - a short Essay.</li> 
            </ul> 
            <p>If you pass the above items successfully, you will receive an Oral Interview date. <br />   
               For further information, please visit <href="http://www.lasdreserve.org">www.lasdreserve.org</a> 
            </p> 
            <center> 
                <br /> 
                <span class="Prev">  
                    <href="javascript:NextLayer('Reserve1');"><img src="Resources/blank.gif" alt="Previous" border=0 /></a>  
                </span> 
            </center> 
        </div> <!-- Reserve2 --> 
        <div class="Content" id="Training1">  
            <h1>What Exactly is the Posse?</h1> 
            <p>We are a dedicated group of Reserve Deputies and Civilian Volunteers whose duties are performed on horseback instead of utilizing a radio car.   
               We provide service to many areas of the county that are inaccessible by vehicle, yet need a law enforcement presence.   
               We perform many details across the county which include the following:  
            </p> 
            <center> 
                <span class="Next">  
                    <href="javascript:NextLayer('Training2');"><img src="Resources/blank.gif" alt="Next" border=0 /></a>  
                </span> 
            </center> 
        </div> <!-- Training1 --> 
        <div class="Content" id="Training2">  
            <h1>What Exactly is the Posse?</h1> 
            <center> 
            <table id="Training2Table">  
                <tbody> 
                    <tr> 
                        <td> 
                            <asp:Image ID="Image3" CssClass="Images" runat="server" BorderColor="Chocolate" BorderStyle="Ridge" 
                                BorderWidth="11px" ImageUrl="~/Resources/BeachRiding.jpg" /> 
                        </td> 
                        <td style="width:20px;"></td> 
                        <td> 
                           <ul> 
                               <li>Rural and Mountain Patrol</li> 
                               <li>Assist Search and Rescue</li> 
                               <li>Zuma Beach Patrol</li> 
                               <li>Halloween Patrol in Lost Hills</li> 
                               <li>Mall Patrol in Santa Clarita</li> 
                               <li>Cowboy Festival</li> 
                               <li>Malibu Chili Cook-Off</li> 
                               <li>Parades</li> 
                           </ul> 
                            <asp:Image ID="Image2" runat="server" BorderColor="Chocolate" BorderStyle="Ridge" 
                                BorderWidth="11px" ImageUrl="~/Resources/Parade.jpg" /> 
                        </td> 
                        <td style="width:20px;"></td> 
                        <td> 
                            <asp:Image ID="Image4" runat="server" BorderColor="Chocolate" BorderStyle="Ridge" 
                                BorderWidth="11px" ImageUrl="~/Resources/CowboyFestival.jpg" />              
                        </td> 
                    </tr> 
                </tbody> 
            </table> 
            <div class="Prev">  
                <href="javascript:NextLayer('Training1');"><img src="Resources/blank.gif" alt="Previous" border=0 /></a>  
            </div> 
            </center> 
        </div> <!-- Training2 --> 
        <div class="Content" id="Civilian1">  
            <h1>How to Become a Civilian Volunteer</h1> 
            <h3>Equestrian Volunteers on Patrol</h3> 
            <p>"Equestrian Volunteers on Patrol" are a ready resource available to assist individual stations and posse units by patrolling remote areas of Los Angeles County on horseback.  The use of volunteers is a responsibility of the individual station coordinator and may be used to assist regional posse units as needed.  The use of equestrian VOP volunteers allows for a rapid increase in staff strength and provides the community with added protection by providing extra "eyes and ears."  Most mounted VOP groups are integrated into various stations' posses as part of those units and are subject to their rules and requirements.  
            </p> 
            <center> 
                <img id="Img1" class="Patch" src="Resources/CivilianPatch.gif" alt="Sworn Patch" /> 
                <br /> 
                <span class="Next">  
                    <href="javascript:NextLayer('Civilian2');"><img src="Resources/blank.gif" alt="Next" border=0 /></a>  
                </span> 
            </center> 
        </div> <!-- Civilian1 --> 
        <div class="Content" id="Civilian2">  
            <h1>How to Become a Civilian Volunteer</h1> 
            <h3>Minimum Requirements for Consideration</h3> 
            <p>Minimum Requirements for Consideration Volunteers are required to complete a background investigation to evaluate their character and must sucessfully complete the required training mandated by the VOP program. Equestrian volunteers repain part of the station complement and their activities are coordinated through their home unit. They must also complete mounted training as directed by their station's posse unit. All activities must be approved by the station coordinator as outlined in the VOP manual issued by the Office of Special Programs.  
            </p> 
            <ul> 
                <li>Must be at least 18 years of age.</li> 
                <li>Must have a valid California Drivers License</li> 
                <li>Must pass an oral interview and complete a background check</li> 
                <li>Must have access to a trail horse, servicable trailer and tow vehicle.</li> 
            </ul> 
            <center> 
                <img id="Img2" class="Patch" src="Resources/CivilianPatch.gif" alt="Sworn Patch" /> 
                <br /> 
                <span class="Prev">  
                    <href="javascript:NextLayer('Civilian1');"><img src="Resources/blank.gif" alt="Next" border=0 /></a>  
                </span> 
                <span class="Next">  
                    <href="javascript:NextLayer('Civilian3');"><img src="Resources/blank.gif" alt="Next" border=0 /></a>  
                </span> 
            </center> 
        </div> <!-- Civilian2 --> 
        <div class="Content" id="Civilian3">  
            <h1>How to Become a Civilian Volunteer</h1> 
            <h3>Minimum Requirements Upon Acceptance</h3> 
            <ul> 
                <li>Attend monthly station and posse meetings</li> 
                <li>Donate a minimum of 8 hours patrol time each month (this number of hours may vary by station; check with the Volunteer Coordinator at your intended station).</li> 
                <li>Purchase the standard uniforms.</li> 
                <li>Attend Posse equestrian related training as determined by the station coordinator.</li> 
                <li>Auditing of non-equestrian training is encouraged to increase awarness.</li> 
                <li>Complete the training course Outlined in the Volunteer on Patrol Manual.</li> 
            </ul> 
            <center> 
                <img id="Img3" class="Patch" src="Resources/CivilianPatch.gif" alt="Sworn Patch" /> 
                <br /> 
                <span class="Prev">  
                    <href="javascript:NextLayer('Civilian2');"><img src="Resources/blank.gif" alt="Next" border=0 /></a>  
                </span> 
                <span class="Next">  
                    <href="javascript:NextLayer('Civilian4');"><img src="Resources/blank.gif" alt="Next" border=0 /></a>  
                </span> 
            </center> 
        </div> <!-- Civilian4 --> 
        <div class="Content" id="Civilian4">  
            <h1>How to Become a Civilian Volunteer</h1> 
            <h3>Duties of Equestrian Volunteers</h3> 
            <p>Equestrian patrol volunteers' participation in posse activities is strictly on a <span style="color:Red; text-decoration:underline; font-weight:bold;">NON-LAW ENFORCEMENT</span> basis.<br />The following are examples of typical duties:</p> 
            <ul> 
                <li>Patroling trails for suspicious activities and safety hazards.</li> 
                <li>Accompany Uniform Mounted Posse reserves to assist with non-law enforcement activities (ground support).</li> 
                <li>Respond to non-law enforcement posse call outs, such as searches for missing persons.</li> 
                <li>Assist with station volunteer activities.</li> 
                <li>Other duties as required by the station posse.</li> 
            </ul> 
            <center> 
                <img id="Img4" class="Patch" src="Resources/CivilianPatch.gif" alt="Sworn Patch" /> 
                <br /> 
                <span class="Prev">  
                    <href="javascript:NextLayer('Civilian3');"><img src="Resources/blank.gif" alt="Next" border=0 /></a>  
                </span> 
            </center> 
        </div> <!-- Civilian4 --> 
        <div class="Content" id="Links">  
            <div id="LinksLeft">  
                <center> 
                    <h1>Links to Other Web Sites</h1> 
                    <br /> 
                    <ul> 
                        <li><a href="http://www.lasd.org">Los Angeles County Sheriff</a></li>  
                        <li><a href="http://www.avheros.com">Palmdale Posse</a></li>  
                        <li><a href="http://www.lasdreserve.org">Reserve Forces Bureau</a></li>  
                        <li><a href="http://www.shaliko1.com">Temple Posse</a></li>  
                    </ul> 
                </center> 
            </div> 
    </div> <!-- Links --> 
        <div class="Content" id="Contact">  
            <div id="Div2">  
                <center> 
                    <h1>Santa Clarita Valley Posse</h1> 
                    <h2>Contact Information</h2> 
                    <br /> 
                    <p> 
                    During your application process, be sure to attend the meetings and make connections.   
                    <br /> 
                    We are here to assist you in any way we can.  
                    <br /><br /> 
                    <href="mailto:recruitment@scvposse.org?subject=Question">Recruitment@scvposse.org</a> 
                    </p> 
                    <table class="Menu">  
                        <tbody> 
                            <tr> 
                                <td> 
                                    <href="javascript:NextLayer('SCVMap');">Map to SCV Station</a> 
                                </td> 
                                <td></td>  
                                <td> 
                                    <href="javascript:NextLayer('LHSMap');">Map to LHS Station</a> 
                                </td>      
                            </tr> 
                        </tbody> 
                    </table> 
                </center> 
            </div> 
        </div> <!-- Contact --> 
        <div class="Content" id="SCVMap">  
            <h1>Santa Clarita Valley Sheriff's Station</h1> 
            <h5>23740 Magic Mountain Parkway</h5> 
            <h5>Valencia, California 91355-2102</h5> 
            <center> 
                <img id="Img5" src="Resources/MapSCVStation.png" alt="SCV Map" /> 
                <br /> 
                <span class="Prev">  
                    <href="javascript:NextLayer('Contact');"><img src="Resources/blank.gif" alt="Next" border=0 /></a>  
                </span> 
            </center> 
        </div> <!-- SCVMap --> 
        <div class="Content" id="LHSMap">  
            <h1>Malibu/Lost Hills Sheriff's Station</h1> 
            <h5>27050 Agoura Road</h5> 
            <h5>Agoura, California 91301-5336</h5> 
            <center> 
                <img id="Img6" src="Resources/MapLHSStation.png" alt="LHS Map" /> 
                <br /> 
                <span class="Prev">  
                    <href="javascript:NextLayer('Contact');"><img src="Resources/blank.gif" alt="Next" border=0 /></a>  
                </span> 
            </center> 
        </div> <!-- LHSMap --> 
        <div class="Content" id="Newsletter">  
            <div class="CenterMenu" id="Div3">  
                <center> 
                    <h1>Hoof Prints</h1> 
                    <h2>Posse Newsletter</h2> 
                    <br /> 
                </center> 
            </div> 
    </div> <!-- Newsletter --> 
        <div class="Content" id="Donate">  
            <h1>Support Santa Clarita Valley Posse</h1> 
            <h5>(Formerly Region 1 Posse North)</h5> 
            <br /> 
            <h3>If you would like to support the Santa Clarita Posse and the work we do in our community, you can do that in one of two ways:</h3> 
            <ul> 
                <li>Donations can be made directly to the Santa Clarita Posse by contacting the Santa Clarita Posse at <href="mailto:webmaster@scvposse.org">webmaster@scvposse.org</a>. Since we are a non-profit organization, all donations are tax deductable.</li> 
                <li>You can purchase supplies from Country Supply and they will donate up to 5% of purchases to Santa Clarita Posse.  When placing your order , simply type <span style="color: Red; font-weight:bold;">R1PN</span> in the "Country Care Code" box available on their web site at: <href="http://www.countrysupply.com">www.countrysupply.com</a>.</li> 
            </ul> 
            <center> 
                <h1><span style="color: Red; font-weight:bolder;">Thank You!</span></h1>  
            </center> 
        </div> <!-- PosseReq --> 
    </div> <!-- MainContent --> 
    </form> 
</body> 
</html> 
 
There is no code in the code-behind page.
Any help would be much appreciated. 

 

 

 

0
Fiko
Telerik team
answered on 18 Feb 2010, 07:05 AM
Hi Scott,

We are aware of such a behavior when the RadRotator control first is hidden and then shown. The solution is when the div, that contains the RadRotator control, is shown (become visible) to call RadRotator's repaint client-side method:
var oRotator = $find("<%= RadRotator1.ClientID  %>");
oRotator.repaint();

I hope this helps.

All the best,
Fiko
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Scott Ponder
Top achievements
Rank 1
answered on 18 Feb 2010, 02:24 PM
That solved the problem.

Than you !!!
0
divya sahu
Top achievements
Rank 1
answered on 05 Mar 2010, 11:47 AM
hello
0
Hamdy
Top achievements
Rank 1
answered on 15 Mar 2010, 12:32 PM
still for me not working

and the I check this code

var rotator = document.getElementById("<%= RadRotator1.ClientId  %>");
  alert (rotator.repaint);

it is giving me undefined 
any function of rotator i could not use it and is undefined 



please help
0
Lini
Telerik team
answered on 15 Mar 2010, 12:37 PM
Hi,

You are using document.getElementById() to get the rotator object which is not valid for the ASP.NET AJAX controls. You need to use $find() instead. Please see Fiko's last reply for the correct code snippet:

var oRotator = $find("<%= RadRotator1.ClientID  %>");


Sincerely yours,
Lini
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Hamdy
Top achievements
Rank 1
answered on 15 Mar 2010, 12:39 PM
actually $find("<%= RadRotator1.ClientId  %>"); returning null
and 
document.getElementById("<%= RadRotator1.ClientId  %>");
returning a DIV

both returning a wrong object

but I think because the rotator in ascx control

what do u think?
0
Hamdy
Top achievements
Rank 1
answered on 15 Mar 2010, 01:16 PM
I tried this

 var oRotator = $find("cwc_IconBar.ascx_RadRotator1");
and it works and return me the right object

but still the repaint do not redraw the the rotator in chrome
0
Lini
Telerik team
answered on 16 Mar 2010, 12:51 PM
Hello Hamdy Ghanem,

If the $find() call is returning null, this means that you are trying too early and the page is not completely loaded yet (e.g. in the window.onload event or directly in a script tag). You should call the code after the ASP.NET AJAX framework is initialized. For example, in the pageLoad function:

function pageLoad()
{
    var oRotator = $find("<%= RadRotator1.ClientID  %>");
    oRotator.repaint();
}

pageLoad is automatically executed by ASP.NET AJAX.

If you are loading the user control during an AJAX request, then the code to repaint the rotator should be in the ResponseReceived or ResponseEnd event of the AJAX request.

All the best,
Lini
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Rotator
Asked by
divya sahu
Top achievements
Rank 1
Answers by
Lini
Telerik team
Scott Ponder
Top achievements
Rank 1
Fiko
Telerik team
divya sahu
Top achievements
Rank 1
Hamdy
Top achievements
Rank 1
Share this question
or