hi NC01 Thankns a lot for the reply.i have ty the code which you have shown the link.but it is not working for me. here is the code http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_httprequest_js4 aspx code: <script type="text/javascript"> var xmlhttp;
function loadXMLDoc(url) { xmlhttp=null; if (window.XMLHttpRequest) {// code for IE7, Firefox, Mozilla, etc. xmlhttp=new XMLHttpRequest(); } else if (window.ActiveXObject) {// code for IE5, IE6 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } if (xmlhttp!=null)
{ xmlhttp.onreadystatechange=onResponse; xmlhttp.open("GET",url,true); xmlhttp.send(null); } else { alert("Your browser does not support XMLHTTP."); } } function onResponse() { if(xmlhttp.readyState!=4) return; if(xmlhttp.status!=200) { alert("Problem retrieving
XML data"); return; } txt="
"; x=xmlhttp.responseXML.documentElement.getElementsByTagName("CD"); for (i=0;i <form id="form1" runat="server"> <div id="copy"> </div> </form> C# code: protected void Page_Load(object sender, EventArgs e) { string path = Server.MapPath("~/sample.xml"); btnGrid.Attributes.Add("onClick",
"loadXMLDoc('" + path + "');"); } so if i ru this page and click the button i a mnot getting any output.it is blank. please help me in this. ang how t orefresh this using the javascript timer.please i am struckig up with this for lonf time. kindly help me
in this.
making impossible into possible is possible when we have determination,dedication,devotion.
born2win
Member
89 Points
411 Posts
Re: call serverside code in javascript with timer
Feb 20, 2009 04:29 AM|LINK