Thursday, November 21, 2013

Realtime php scripts

<script>
function showExpHint(s)
{
if (s.length==0)
  {
  document.getElementById("txtExmpHint").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("txtExmpHint").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","gethint.php?q="+s,true);
xmlhttp.send();
}
</script>


----------------------------------


<form>
First name: <input type="text" onkeyup="showExmpHint(this.value)">
</form>
<p>Suggestions: <span id="txtExmpHint"></span></p>

150+java interview questions and answers

Java Platform 1 . Why is Java so popular? 2 . What is platform independence? 3 . What is bytecode? 4 . Compare JDK vs JVM vs JRE 5 ....