Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 8th, 2013  |  syntax: None  |  size: 0.79 KB  |  views: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function loadXMLDoc()
  5. {
  6. var xmlhttp;
  7. if (window.XMLHttpRequest)
  8.   {// code for IE7+, Firefox, Chrome, Opera, Safari
  9.   xmlhttp=new XMLHttpRequest();
  10.   }
  11. else
  12.   {// code for IE6, IE5
  13.   xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  14.   }
  15. xmlhttp.onreadystatechange=function()
  16.   {
  17.   if (xmlhttp.readyState==4 && xmlhttp.status==200)
  18.     {
  19.     document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
  20.     }
  21.   }
  22. xmlhttp.open("GET","ajax_info.jsp",true);
  23. xmlhttp.send();
  24. }
  25. </script>
  26. </head>
  27. <body>
  28.  
  29. <div id="myDiv"><h2>Let AJAX change this text</h2></div>
  30. <button type="button" onclick="loadXMLDoc()">Change Content</button>
  31.  
  32. </body>
  33. </html>
  34.        
  35. <%@ page  language="java" import="java.util.*" errorPage="" %>
  36. <% boolean myInfo = false; %>
  37. <%=""+myInfo%>
clone this paste RAW Paste Data