More Troubles, First JavaScript Script

by Ben Ocean <lists(at)TheWebsons.com>

 Date:  Thu, 05 Oct 2000 00:26:30 -0700
 To:  javascript(at)LaTech.edu
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
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