Go to google type something and it will relocate the search box to the top, and load a results page without hitting search or enter. The results page is black at first then as typing continues it loads results. I'm assuming this uses ajax, but does it load a new html page or somehow change the home page?
HTML:
<div id="top_panel" class="main fluid">
<nav id="topNav" class="fluid">
<ul class="fluid fluidList navSystem">
<li class="fluid navItem web"><a href="index.html" class="web">Web</a></li>
<li class="fluid navItem photos"><a href="#">Photos</a></li>
</ul> <!-- END .navSystem -->
</nav> <!-- END #topNav -->
</div> <!-- END #top_panel -->
AJAX:
<script>
function keypress() {
var xmlhttp;
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("top_panel").removeClass("main").addClass("results");
}
}
xmlhttp.send();
}
</script>