Jump to content

2th last question


The Sea King

Recommended Posts

Use AJAX

<script type="text/javascript">	//Function returns the contents of the file specified in the parameter	function getText(file) {		//Create the xmlHttpRequest object		xmlHttp = new XMLHttpRequest();		if (!xmlHttp) xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");		//This procedure runs after state changes in the connection		xmlHttp.onreadystatechange=function() {			if (xmlHttp.readyState == 4) { //If the file has fully loaded				return xmlHttp.responseText;			}		}		//Establish a connection to your file		xmlHttp.open("GET", file, true);		//Send (nothing) this just makes the server respond		xmlHttp.send(null);	}</script>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...