Drag Panel Extender in Ajax?
- by Surya sasidhar
hi,
i am working on dragpanel extender i write the code for drag panel, it is coming nice but when i drag the panel it going back to the same position where it is initially. This is my code...
Untitled Page
<style type="text/css">
.outerPanel {
border: solid 1px #C0C0C0;
background-color: #e1e1e1;
width: 200px;
height: 300px;
z-index:20;
padding: 2px;
}
.dragPanel {
border: solid 1px #FFFFFF;
background-color: #C0C0C0;
width: 194px;
height: 15px;
color: #FFFFFF;
font-weight:bold;
padding: 2px;
cursor: move;
}
function setBodyHeightToContentHeight()
{
document.body.style.height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) + "px";
}
setBodyHeightToContentHeight();
// Uncomment the line below if you are having problem while resizing the browser window.
window.attachEvent('onresize', setBodyHeightToContentHeight);
<asp:Panel ID="Panel1" runat="server" CssClass="outerPanel">
<asp:Panel ID="Panel2" runat="server" CssClass="dragPanel">
<b>Dragable Panel</b>
</asp:Panel>
<p>
Surya Sasidhar surya sasidhar
Surya Sasidhar surya sasidhar
Surya sasidhar surya sasidhar
</p>
<cc1:DragPanelExtender ID="DragPanelExtender1" TargetControlID="Panel1" DragHandleID ="Panel2" runat="server">
</cc1:DragPanelExtender>
</div>
</form>
and it is ging some javascript error like object required