Reputation:
I'm currently trying to resize this control on browser resize. I tried to look on the forums before asking. I found a Javascript function ( which is not working unfortunately).
<script type="text/javascript">
window.onresize = function()
{
var rotatorElement = document.getElementById("ContentPlaceHolder1_RadRotator1" + "_Div");
rotatorElement.RadResize();
}
</script>
Error : RadResize Null or undefined.
Thanks in advance for your help
Upvotes: 0
Views: 642
Reputation: 182
Hey Arnaud You can easily achieve your goal by specifying fixed layout for the table.
Here is the sample code:
<form id="form1" runat="server">
<table border="1" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed">
<tr>
<td style="width: 100%">
<radR:RadRotator ID="RadRotator1" runat="server" TransitionType="Scroll" ContentFile="http://rss.msnbc.msn.com/id/3033655/device/rss/rss.xml" DataMember="item" Height="130px" Width="100%">
<FrameTemplate>
<div class="NewsList">
<p>
<strong><a href="<%# DataBinder.Eval(Container.DataItem,"link") %>" target="_blank">
<%# DataBinder.Eval(Container.DataItem,"title") %>
</a></strong>
<br />
<%# DataBinder.Eval(Container.DataItem,"pubDate") %>
</p>
<p>
<%# DataBinder.Eval(Container.DataItem,"description") %>
</p>
</div>
</FrameTemplate>
</radR:RadRotator>
</td>
</tr>
</table>
<script language="Javascript" type="text/javascript">
<!--
var RadRotator1=<%= RadRotator1.ClientID %>;
window.onresize=function() {
var rotatorElement = document.getElementById("<%= RadRotator1.ClientID %>" + "_Div");
rotatorElement.RadResize();
};
//-->
</script>
</form>
Upvotes: 0
Reputation: 182
Hey Arnaud Add this script in your aspx page and your problem would be solved:
script type="text/javascript">
window.onresize = function()
{
var rotatorElement = document.getElementById("<%= RadRotator1.ClientID %>" + "_Div");
rotatorElement.RadResize();
}
</script>
Upvotes: 0