Advertisement
Guest User

Untitled

a guest
May 7th, 2012
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <!-- <script type="Text/Jacascript" src="jquery-1.7.2.min.js"></script> -->
  5. <script type="text/javascript" src="https://www.google.com/jsapi"></script>
  6. <script type="text/javascript">
  7. function xmlhttpGet(strURL, varElementId) {
  8. var xmlHttpReq = false;
  9. // Mozilla/Safari
  10. if (window.XMLHttpRequest) {
  11. xmlHttpReq = new XMLHttpRequest();
  12. if (xmlHttpReq.overrideMimeType) {
  13. xmlHttpReq.overrideMimeType('text/xml');
  14. // See note below about this line
  15. }
  16. // IE
  17. } else if (window.ActiveXObject) { // IE
  18. try {
  19. xmlHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
  20. } catch (e) {
  21. try {
  22. xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
  23. } catch (e) {}
  24. }
  25. }
  26. if (!xmlHttpReq) {
  27. alert('ERROR AJAX:( Cannot create an XMLHTTP instance');
  28. return false;
  29. }
  30. xmlHttpReq.open('GET', strURL, true);
  31. xmlHttpReq.setRequestHeader('Content-Type',
  32. 'application/x-www-form-urlencoded');
  33. xmlHttpReq.onreadystatechange = function() {
  34. callBackFunction(xmlHttpReq, varElementId);
  35. //alert(document.getElementById(varElementId).innerHTML);
  36. };
  37. xmlHttpReq.send("");
  38. }
  39.  
  40. function callBackFunction(http_request, varElementId) {
  41. if (http_request.readyState == 4) {
  42. if (http_request.status == 200) {
  43. var responseString = http_request.responseText;
  44. //document.getElementById(varElementId).innerHTML=responseString;
  45. sethtml(varElementId, responseString);
  46. } else {
  47. alert('ERROR: AJAX request status = ' + http_request.status);
  48. }
  49. }
  50. }
  51.  
  52. function sethtml(div,content)
  53. {
  54. var search = content;
  55. var script;
  56.  
  57. while( script = search.match(/(<script[^>]+javascript[^>]+>\s*(<!--)?)/i))
  58. {
  59. search = search.substr(search.indexOf(RegExp.$1) + RegExp.$1.length);
  60. if (!(endscript = search.match(/((-->)?\s*<\/script>)/))) break;
  61. block = search.substr(0, search.indexOf(RegExp.$1));
  62. search = search.substring(block.length + RegExp.$1.length);
  63. var oScript = document.createElement('script');
  64. oScript.text = block;
  65. document.getElementsByTagName("head").item(0).appendChild(oScript);
  66. }
  67. document.getElementById(div).innerHTML=content;
  68. }
  69.  
  70. </script>
  71. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  72. <title>Ack!</title>
  73. <link rel="stylesheet" type="text/css" href="style.css" />
  74. </style>
  75. </head>
  76. <body onload="xmlhttpGet('pub_interface/user_auth.php','auth_status')">
  77.  
  78. <div id="background">
  79.  
  80. <div id="header">
  81. <img src="img/beta_icon.png" />
  82. </div>
  83.  
  84. <div id="auth_status">
  85. </div>
  86.  
  87. <div id="main">
  88. <h1>Welcome to Ack!</h1>
  89. <h2>We aren't open yet.</h2>
  90. </div>
  91.  
  92. <div id="footer">
  93. The scientific theory I like best is that the rings of Saturn are composed entirely of lost airline luggage.</div>
  94. </div>
  95. </body>
  96. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement