It is currently Thu Sep 09, 2010 7:00 am
Index  •  FAQ  •  Search

All times are UTC + 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: simple ajax
PostPosted: Thu May 21, 2009 4:10 pm 
User avatar
User's Group : S.U.S.T

Joined: Mon Mar 09, 2009 11:00 pm
Posts: 11
Here is a simple ajax function

Code:

<script type="text/javascript">
<!--

var xmlhttp = false;
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
function makerequest(serverPage, objID) {
var obj = document.getElementById(objID);
xmlhttp.open("GET", serverPage);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
obj.innerHTML = xmlhttp.responseText;
}

}
xmlhttp.send(null);
}
//-->
</script>






:mrgreen:

_________________
Ruhunnabi


Offline
 Profile  
Top 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron