Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default AJAX : Dynamlically pushed JavaScript not working after Update Panel is updated

Hi all,

I am trying something using ASP.NET AJAX.
Using postback i am adding a JavaScript snippet and a DIV inside a
panel in UPdatePanel.The HTML is shown. The Javascript is written too.
But JavaScript is not working.

</head
<body
<form id="form1" runat="server"
<div
<asp:ScriptManager ID="ScriptManager1" runat="server"
<Scripts
<asp:ScriptReference Path="FusionCharts.js" /
</Scripts
</asp:ScriptManager

</div
<asp:UpdatePanel ID="UpdatePanel1" runat="server"
<ContentTemplate
<script language="javascript" type="text/javascript"
var XML="<chart/";
</script

<asp:Panel ID="p" runat="server" Height="262px"
Width="341px"
please click on the button</asp:Panel
<asp:Button ID="Button1" runat="server"
OnClick="Button1_Click" Text="Button" /
</ContentTemplate
</asp:UpdatePanel


<asp:UpdateProgress ID="UpdateProgress1" runat="server"
DisplayAfter="0"
<ProgressTemplate
delay............................
</ProgressTemplate
</asp:UpdateProgress
</form
<script language="javascript" type="text/javascript"
function pageLoad(){
alert($get('p').innerHTML);
}

</script

</body
</HTML
---------------- CODE BEHIND --------------------

protected void Button1_Click(object sender, EventArgs e)
{
string str = "<div id='Update'HI</div";
str += "<script language='Javascript' type='text/
javascript'document.getElementById('Update').inne rHTML='latest
updated hiiiiiiiiiiii!!!';</script";
System.Threading.Thread.Sleep(3000);
p.Controls.Add(new LiteralControl(str));

}

================================================== ===============

I am using the general ScriptManager coltrol and UpdatePanel that has
a PANEL having an id 'p'.
From the server side postback i am changing this panel's HTML to


<div id='Update'Hi</div<script language='Javascript' type='text/
javascript' document.getElementById('Update').innerHTML='lates t
updated hiiiiiiiiiiii!!!';</script

I can see the div being parsed by the browser. But the <script is not
taken care of by the browser.


PLease, please, please help me out of this.

Am i going wrong somewhere? IS there any way out?

Please help me.


- Arachnid

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can update keep an updated balance on a spreadsheet bug28 Excel Worksheet Functions 1 December 7th 07 09:24 AM
How do I update a checkbox as true when another has been updated fishy Excel Worksheet Functions 1 September 10th 07 11:06 AM
How do I update links from a file that hasn't yet been updated? RichardsDM Excel Worksheet Functions 0 September 22nd 06 02:28 PM
AJAX combo box in excel [email protected] Excel Programming 0 June 20th 06 10:41 AM
Chosen not to update links but they are updated anyway. How stop? Stephen, Generis Excel Discussion (Misc queries) 2 December 21st 05 09:54 PM


All times are GMT +1. The time now is 04:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"