Take a look at the following code (crippled, hard-coded, IE 5.5+ only ):
User types in zipcode, goes somewhere else (simulate that with tab key). Browser passes zipcode to bar.htm server-side but without resubmitting entire page. Whatever/whenever bar.htm returns will be displayed next to zipcode. This concept is also known as "asynchronous remote scripting".
Now, I'm curious is there any simple way to do the same in pure DOM javascript/HTML? No IE stuff, Java/COM, and preferably without IFRAMEs.
Code:
<HTML XMLNS:MSIE ><MSIE:DOWNLOAD ID="oDL" STYLE="behavior:url(#default#download)" />
<form>
<input type="text" name="zip" onchange="remotecall();">
<span id="zip_name" style="width: 200px; background-color: #eeeeee;"></span>
<input type="submit" name="save data">
</form>
<script language="javascript">
function remotecall()
{ oDL.startDownload( "bar.htm?zip=" + window.event.srcElement.value, returncall );
}
function returncall( s )
{ zip_name.innerText = s;
}
</script>
User types in zipcode, goes somewhere else (simulate that with tab key). Browser passes zipcode to bar.htm server-side but without resubmitting entire page. Whatever/whenever bar.htm returns will be displayed next to zipcode. This concept is also known as "asynchronous remote scripting".
Now, I'm curious is there any simple way to do the same in pure DOM javascript/HTML? No IE stuff, Java/COM, and preferably without IFRAMEs.