Do you have an example of how to pass in an argument (for example an image name) from a javascript function to a radlightbox when it opens? I want to do something like the below, where the onmouseover in the <img src opens the lightbox if I hard code the value in the <asp:Image.
I need to load different images on different img src tags so I thought passing the image name via the funcion was the cleanest way to do so.
Is this the best way to do this:
http://www.telerik.com/forums/parameterized-lightbox-show()-functions---how-to-do-it
The disadvantage is that it looks like every image is loaded when the page is rendered, I was hoping it load the image dynamically.
Thanks for your help!
<script type="" >
function loadlb(imageName) {
var rbx = $find('<%= rlbBox.ClientID %>');
rbx.show();
}
</script>
<telerik:RadLightBox Modal="true" RenderMode="Auto" ClientIDMode="Static" ID="rlbBox" runat="server" ShowCloseButton="true">
<ClientSettings><AnimationSettings></AnimationSettings></ClientSettings>
<Items>
<telerik:RadLightBoxItem>
<ItemTemplate>
<asp:Image runat="server" ImageUrl="<image_from_loadlb>"/>
</ItemTemplate>
</telerik:RadLightBoxItem>
</Items>
</telerik:RadLightBox>
<img src=<some image> onmouseover="loadlb('imageToLoad'.jpg')" >
I need to load different images on different img src tags so I thought passing the image name via the funcion was the cleanest way to do so.
Is this the best way to do this:
http://www.telerik.com/forums/parameterized-lightbox-show()-functions---how-to-do-it
The disadvantage is that it looks like every image is loaded when the page is rendered, I was hoping it load the image dynamically.
Thanks for your help!
<script type="" >
function loadlb(imageName) {
var rbx = $find('<%= rlbBox.ClientID %>');
rbx.show();
}
</script>
<telerik:RadLightBox Modal="true" RenderMode="Auto" ClientIDMode="Static" ID="rlbBox" runat="server" ShowCloseButton="true">
<ClientSettings><AnimationSettings></AnimationSettings></ClientSettings>
<Items>
<telerik:RadLightBoxItem>
<ItemTemplate>
<asp:Image runat="server" ImageUrl="<image_from_loadlb>"/>
</ItemTemplate>
</telerik:RadLightBoxItem>
</Items>
</telerik:RadLightBox>
<img src=<some image> onmouseover="loadlb('imageToLoad'.jpg')" >