<html> <head> <script type="text/javascript"> function runJsAsynch(url){ var xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange = process; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function process(){ if(this.readyState == 4){ if(this.status == 200){ eval(this.responseText); } else{ window.alert("Error "+ xmlhttp.statusText); } } } </script> </head> <body> <button type="button" onclick="runJsAsynch('msg1.js')">Alert Message</button> <button type="button" onclick="runJsAsynch('msg2.js')">HTML Message</button> </body> </html>
http
https
file
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)