Showing posts with label renders. Show all posts
Showing posts with label renders. Show all posts

Monday, March 26, 2012

Atlas UpdatePanel, EnablePartialRendering, and a custom javascript problem.

Hi all,

I have a javascript that renders custom tooltips on onmouseover events of objects on my pages, for example an A element. The custom javascript points the elements onmouseover event to delegates. This works fine except however when an UpdatePanel is render after the page has initially loaded. The function pointers are lost by objects within the UpdatePanel.

How can I setup an client side event procedure that can be run everytime the UpdatePanel renders something so that I can reinstate the lost function pointers?

Or, is there a better way to do this?

Thanks,

Andeezle

Please allow me to simplify my question. In other words, how can i run a client side script after an updatepanel updates?

also, i need a reference to the updatepanel that updated.

-Thanks,

Andeezle


Hi,

please check theUpdateProgressSignup written bySimone Busoli.

Thank you. Very cool. And it worked too!!!

-Andy

Wednesday, March 21, 2012

Atlas renders duplicated buttons...

Hi, All:

Please check the following code:

put updatePanel within a table will duplicate button and dropdownlist.

remove table tag is fine though.

Is this a bug?

---------------------

<%@dotnet.itags.org.PageLanguage="C#" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<scriptrunat="server">

void Button1_Click(object sender,EventArgs e)

{

listMatter.Items.Clear();

listMatter.Items.Add("text1");

listMatter.Items.Add("text2");

}

</script>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>Untitled Page</title>

</head>

<body>

<formid="form1"runat="server">

<atlas:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="true">

</atlas:ScriptManager>

<div>

<table>

<atlas:UpdatePanelID="up1"Mode="Conditional"runat="server">

<Triggers>

<atlas:ControlEventTriggerControlID="Button1"EventName="Click"/>

</Triggers>

<ContentTemplate>

<tr><td>

<asp:LinkButtonID="Button1"runat="server"OnClick="Button1_Click"Text="Button"/>

Matter:

</td>

</tr>

<tr><td>

<asp:DropDownListID="listMatter"runat="server"></asp:DropDownList>

</td></tr>

</ContentTemplate>

</atlas:UpdatePanel>

</table>

</div>

</form>

</body>

</html>

not to get too far off topic here but...
why would you create a table and then the update panel control?

is your intent to create a row that is updatable?
interesting concept if you are... (most would create a table cell and then the update panel or use divs instead)

i don't really know but i would look to see if using the "tbody" helps in any way
the reason why i say that is because there are instances that i have seen where the "tbody" must be present for some "features" to work properly in Atlas


Hi,

I think the problem is that the UpdatePanel wraps its content with a div or span tag, thus the markup for the table is like:

<table>
<div><!-- div as first child of table -->
...
</div>
</table>
and this cause problems when replacing the updated HTML using the DOM. I would place the UpdatePanel inside the cell, to wrap only the DropDownList, like meisinger suggested.