Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.10 KB | None | 0 0
  1. <script>
  2. function showUser(str) {
  3.     if (str == "") {
  4.         document.getElementById("txtHint").innerHTML = "";
  5.         return;
  6.     } else {
  7.         if (window.XMLHttpRequest) {
  8.             // code for IE7+, Firefox, Chrome, Opera, Safari
  9.             xmlhttp = new XMLHttpRequest();
  10.         } else {
  11.             // code for IE6, IE5
  12.             xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  13.         }
  14.         xmlhttp.onreadystatechange = function() {
  15.             if (this.readyState == 4 && this.status == 200) {
  16.                 document.getElementById("txtHint").innerHTML = this.responseText;
  17.             }
  18.         };
  19.         xmlhttp.open("GET","AccountInformation.php?value="+str,true);
  20.         xmlhttp.send();
  21.     }
  22. }
  23. </script>
  24. <body>
  25.  
  26. <form>
  27. <select name="value" onchange="showUser(this.value)">
  28.   <option value="">Select Server:</option>
  29.   <option value="MortalStrikeAccountInformation">MortalStrike</option>
  30.   <option value="DemonAccountInformation">Demon</option>
  31.   </select>
  32. </form>
  33. <br>
  34. <div id="txtHint"><b>Please Select Server To Show your Information.</b></div>
  35.  
  36. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement