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

RadRotator not working in FireFox

2 Answers 63 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
prabha
Top achievements
Rank 1
prabha asked on 22 Dec 2010, 05:16 AM
Hi,
  We are using RadRotator in our application .Its Working fine in IE.
But Mozila its not working . 

I am doubtful in the if stmt for the following line..
if (rotatorItem._element.all[16].defaultValue != null)

I am using the following code.Please give me any suggestions

<

 

 

telerik:RadRotator ID="RadRotator1" runat="server" Height="440px" Width="300px" RotatorType="SlideShowButtons" ItemHeight="100px" ItemWidth="300px" ScrollDuration="2000" ScrollDirection="Up, Down" OnItemDataBound="RadRotator1_ItemDataBound" FrameDuration="50" ClientIDMode="Static" OnClientItemClicked="showSelected" WrapFrames="False" EnableAjaxSkinRendering="False"

 

 

 

EnableTheming="False" OnClientLoad="Rotatorcss">

 

 

<ItemTemplate>

 

 

<div>

 

 

 

<table width="100%" border="0" cellspacing="0" cellpadding="5" style="padding: 5px 10px 0 10px">

 

 

<tr>

 

 

<td width="71%" nowrap="nowrap">

 

 

 

<asp:Label ID="lblplanname" class="plantitle" runat="server" Text='<%# Eval("plandesc2")%>'></asp:Label>

 

 

 

<br />

 

 

 

<span class="plandescription">

 

 

 

<asp:Label ID="lblplandesc" runat="server" Text='<%# Eval("plandesc1")%>'></asp:Label>

 

 

 <

/span>

 

 

 

</td>

 

 

<td width="29%">

 

 

<asp:HyperLink ID="lnkbtndeail" Text="View Detail" class="plandetailslinks" runat="server" />

 

 

</td>

 

</tr>

 

 

<tr>

 

 

 

<td class="plandescription">

 

 

<asp:Label ID="lblplanprice" runat="server" Text='<%# Eval("plandesc3")%>'></asp:Label>

 

 

</td>

 

 

 

<td>

 

 

</td>

 

</tr>

 

 

</table>

 

 

 

</div>

 

 

<asp:HiddenField ID="planID" runat="server" Value='<%# Eval("PlanId")%>' />

 

<asp:HiddenField ID="PlanType" runat="server" Value='<%# Eval("PlanType")%>' />

 

 

<asp:HiddenField ID="PlanStorage" runat="server" Value='<%# Eval("PlanStorageInMB")%>' />

 

 

 

<asp:HiddenField ID="planshortname" runat="server" Value='<%# Eval("PlanShortName")%>' />

 

 

<asp:HiddenField ID="PlanAmount" runat="server" Value='<%# Eval("PlanAmount")%>' />

 

</ItemTemplate>

 

<SlideShowAnimation Duration="500" Type="CrossFade" />

 

</

 

 

telerik:RadRotator>

Javascript
function SetSelectedPlanDisplay(rotatorItem, sender) {

 

 

 

if (flag != 1) {

 

if (rotatorItem._element.all[16].defaultValue != null) {

 

var PlanID = rotatorItem._element.all[16].defaultValue;

 

 

 

var PlanType = rotatorItem._element.all[17].defaultValue;

 

 

 

var PlanStorage = rotatorItem._element.all[18].defaultValue;

 

 

 

var Planname = rotatorItem._element.all[6].innerHTML;

 

 

 

 

var Planshortname = rotatorItem._element.all[19].defaultValue;

 

 

 

 

var Planshortamt;

 

 

 

 

if (rotatorItem._element.all[20].defaultValue != null) {

 

 

Planshortamt = rotatorItem._element.all[20].defaultValue;

}

 

else {

Planshortamt = 0;

}

 

var str = rotatorItem._element.innerText;

 

 

str = (str.replace(/View Detail/i,

 

""));

 

var selectedmsg = "You have selected " + str;

 

document.getElementById(

 

'lblselectedPlan').value = PlanID;

 

 

document.getElementById(

 

'lblplantxt').value = selectedmsg;

 

 

document.getElementById(

 

'lblPlanType').value = PlanType;

 

 

document.getElementById(

 

'lblPlanStorage').value = PlanStorage;

 

 

document.getElementById(

 

'HdnSelectedPlanStorage').value = PlanStorage;

 

 

 document.getElementById(

 

'HdnSelectedPlanId').value = PlanID;

 

 

document.getElementById(

 

'hdnname').value = Planname;

 

 

 document.getElementById(

 

'hdshortname').value = Planshortname;

 

 

 document.getElementById(

 

'hdnamt').value = Planshortamt;

 

 

 document.getElementById(

 

'HdnBindStorage').value = "true";

 

 

 

document.getElementById(

 

'trlblplan').style.display = "block";

 

 

document.getElementById(

 

'lblplanmsg').value = selectedmsg;

 

 

 

 document.getElementById('pnlRegisteration').style.display = "block";

 

}

flag = 0;

 

 

if (!canSubmit) {

 

sender.disabled = 

 

true;

 

$find(

 

'<%=RadAjaxManager.GetCurrent(Page).ClientID %>').ajaxRequest("OnClickSearch");

 

 

 r

 

eturn false;

 

 

}

}

}

 

 

catch (err) {

 

 

 

return false;

 

 

}

}

 

 

function showSelected(sender, args) {

 

 

 

var showbj = sender.get_items();

 

 

 

SetSelectedPlanDisplay(args._item, showbj);

 

return true;

 

}

 


2 Answers, 1 is accepted

Sort by
0
prabha
Top achievements
Rank 1
answered on 22 Dec 2010, 07:30 AM
Anyone help this?

Thanks
Prabha
0
Fiko
Telerik team
answered on 23 Dec 2010, 02:30 PM
Hello Prabha,

The approach that you use is not browser independent and I recommend you to use this approach in order to get reference to an element inside the rotator's item template. Also, I strongly recommend you to use the RadRotator's public API only in order to avoid potential problems in the feature.

Kind regards,
Fiko
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Rotator
Asked by
prabha
Top achievements
Rank 1
Answers by
prabha
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or