-
Refreshing a Text control
How to refresh a text control (or datagrid control) with a new data every two minutes without refreshing the page
-
Hi,
Use XMLHttpRequest Object and achieve it in asyncrhronous way.Yes nothing but AJAX.
thanks
prasanth
-
How would I use XMLHttpRequest!!, I need to use it in the HTML part of ASP.NET web page using JavaScript, could you show me the codes
-
Hi,
Hope this code helps.If not search in google for AJAX + ASP.NET examples.
<HEAD>
<style type="text/css">
<!--
#contentLYR {
position:absolute;
width:200px;
height:115px;
z-index:1;
left: 200px;
top: 200px;
}
-->
</style>
<script type="text/javascript">
<!-- Begin
function ajaxLoader(url,id) {
if (document.getElementById) {
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
}
if (x) {
x.onreadystatechange = function() {
if (x.readyState == 4 && x.status == 200) {
el = document.getElementById(id);
el.innerHTML = x.responseText;
}
}
x.open("GET", url, true);
x.send(null);
}
}
//-->
</script>
</HEAD>
<BODY onload="ajaxLoader('demo.xml','contentLYR')">
<div id="contentLYR">
</div>
Thanks
Prasanth J.V.R.S
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks