Showing posts with label runat. Show all posts
Showing posts with label runat. Show all posts

Wednesday, March 28, 2012

Different behaviour between Atlass DragPanel and Ajaxs

<asp:Panel ID="Panel6" runat="server" Width="100%"> <asp:Panel BorderStyle="Solid" BorderWidth="2px" BorderColor="black" ID="headerPanel" runat="server" Width="100%" Height="20px"> <input type="text" id="iName" readonly="readonly" value="Drag me"/> </asp:Panel> <asp:Panel BorderStyle="Solid" BackColor="#0B3D73" ForeColor="whitesmoke" BorderWidth="2px" BorderColor="black" ID="Panel8" runat="server" Width="100%" CssClass="overflowHidden">Something here </asp:Panel></asp:Panel>

The panel above working fine with Atlas's DragPanel, as I can freely click on anywhere inside the headerPanel to move the Panel6 around, include the area within the "iName" label.

But the problem is when I move to Ajax Asp.NET Beta 2, I can click only on the area of headerPanel in which "iName" is not cover move Panel6 around. When I click iName and move it, nothing happen.

Do you guy have any idea or workaround to fix this? As I need iName as an input to dynamically change the text using Javascript

This is by design perwork item 6429: undraggable elements are "input", "button", "select", "textarea", "label". You're welcome to modify checkCanDrag in FloatingBehavior.js if you'd like to play around with removing this limitation.

Wednesday, March 21, 2012

delete ajax Extender with Javascript

hi

I have a problem with AutoCompleteExtender.

the code in HTML

<tr id="trUserName">
<td>
<asp:TextBox runat="server" id="txtUserName" />
<ajax:AutoCompleteExtender id="aceUserName" runat="server" TargetControlId="txtUserName"..... />
</td>
</tr>

when I run script below, it has errors.

var node = document.getElementById('trUserName');
node.parentNode.removeChild(node);

I have tried, if <tr /> tag without any Extender Control, it can be removed.

and I have to remove control in javascript.

Can you help me ?

Hi Benelf,

I think the best way for your situation is put them inside a div container. When you want to delete it, you can hide the div. For example,

<tr id="trUserName">
<td>

<div id="automCompleteContainer">
<asp:TextBox runat="server" id="txtUserName" />
<ajax:AutoCompleteExtender id="aceUserName" runat="server" TargetControlId="txtUserName"..... />

</div>
</td>
</tr>

To hide it , you can do it like this. document.all.automCompleteContainer.style.display ="none";

If you insist on deleting them, I suggest that you should first dispose() the AutoCompleteExtender by using $find("AutoCompleteExtender's BehavoirID").dispose().

I hope this help.

Best regards,

Jonathan