hi,i am using webdialog window in my application. when window is scroll i need to get how much user has scrolled the window using javascript.i tried below code it retuns 0 always.var objpopup = document.getElementById("Dialogwindowid");var test = objpopup.scrollTop;
Could anyone suggest me how can we acheve this.Regards,M.Seenuvasan
Hi Seenuvasan,
I wrote a sample for you to check instant scroll.
<script type="text/javascript">function getScroll(){ var dialog = $find('<%=WebDialogWindow1.ClientID%>'); if(dialog) alert('scroll:' + dialog.get_contentPane().getBody().scrollLeft + ':' + +dialog.get_contentPane().getBody().scrollTop);}</script><ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="200px" Width="200px"> <ContentPane> <Template> <div style="width:500px;height:500px;border:1px solid red;"></div> </Template> </ContentPane></ig:WebDialogWindow><input type='button' value='get scroll' onclick='getScroll()' />