hwg-languages archives | Oct 2000 | new search | results | previous | next |
More Troubles, First JavaScript Scriptby Ben Ocean <lists(at)TheWebsons.com> |
|
Hi; Still having problems with this script. I've stripped it down to the bare essentials to trouble-shoot. Your help would be greatly appreciated! TIA, BenO This much is in the head... <script language="JavaScript1.1"> <!-- function myiframe(this) { var theText = ""; var iFrame = null; switch (this) { case "bloomTimes": document.write("hello, world!"); break; default: document.write(""); } if(document.layers){ // existence of array implies netscape iFrame = document.layers["frame"]; iFrame.document.open(); iFrame.document.write(theText); iFrame.document.close(); } else if(document.all){ // existence of method implies IE iFrame = document.all("frame"); iFrame.innerHTML = theText; } else { // neither implies no layer capabilies alert("you can't use layers"); // how you handle this case is up to you } } //--> </script> This much is in the body... <a href="javascript:myiframe('bloomTimes')" onMouseOver="myiframe('bloomTimes')" name="bloomTimes" onMouseOut="myiframe('')">Bloom Times</a><br> and then... <span class="myiframe"> <iframe src="javascript:myiframe(this);" width=209 height=264 scrolling=no> </span> Thanks again for your help! BenO
HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA