All pastes #988319 Raw Edit

Untitled

public text v1 · immutable
#988319 ·published 2008-04-17 13:59 UTC
rendered paste body
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>
	<script type="text/javascript">
		var xmlhttp;
		function loadXMLDoc(url)
		{
		xmlhttp=null;
		if (window.XMLHttpRequest)
		  {// code for Firefox, Opera, IE7, etc.
		  xmlhttp=new XMLHttpRequest();
		  }
		else if (window.ActiveXObject)
		  {// code for IE6, IE5
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		  }
		if (xmlhttp!=null)
		  {
		  xmlhttp.onreadystatechange=state_Change;
		  xmlhttp.open("GET",url,true);
		  xmlhttp.send(null);
		  }
		else
		  {
		  alert("Your browser does not support XMLHTTP.");
		  }
		}

		function state_Change()
		{
		if (xmlhttp.readyState==4)
		  {// 4 = "loaded"
		  if (xmlhttp.status==200)
		    {// 200 = "OK"
		    document.getElementById('T1').innerHTML=xmlhttp.responseText;
		    }
		  else
		    {
		    alert("Problem retrieving data:" + xmlhttp.statusText);
		    }
		  }
		}
	</script>
</head>

<body>
				<ul>
					<li><a onclick="loadXMLDoc('page1.html')">page1</a></li>
					<li><a onclick="loadXMLDoc('page2.html')">page2</a></li>
					<li><a onclick="loadXMLDoc('page3.html')">page3</a></li>
				</ul>


<div id="T1">
<h1>change bit</h1>
</div>

</body>

</html>