Jump to content

Link to Elements


Recommended Posts

<html><head><script type="text/javascript">var xmlhttpfunction loadXMLDoc(url){xmlhttp=null// code for Mozilla, etc.if (window.XMLHttpRequest)  {  xmlhttp=new XMLHttpRequest()  }// code for IEelse if (window.ActiveXObject)  {  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 shows "loaded"if (xmlhttp.readyState==4)  {  // if "OK"  if (xmlhttp.status==200)  {  document.getElementById('T1').innerHTML=xmlhttp.responseText  }  else  {  alert("Problem retrieving data:" + xmlhttp.statusText)  }  }}</script></head><body onload="loadXMLDoc('test_xmlhttp.txt')"><div id="T1" style="border:1px solid black;height:40;width:300"></div><br /><button onclick="loadXMLDoc('test_xmlhttp2.txt')">Click</button></body></html>

How can you make something like this but instead of opening a seperate xml you can open a certrain element or node?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...