Fwd: Re: More Troubles, First JavaScript Script
by Ben Ocean <lists(at)TheWebsons.com>
|
Date: |
Fri, 06 Oct 2000 01:08:56 -0700 |
To: |
hwg-languages(at)hwg.org |
Cc: |
javascript(at)LaTech.edu |
|
todo: View
Thread,
Original
|
|
Can someone p-l-e-a-s-e tell me what in tarnation I'm doing wrong here??
Very frustrating... *first* time round trying to script in JS. Your help is
v-e-r-y appreciated!!!
BenO
>Unfortunately, that didn't achieve the desired effect. Thanks, anyway.
>BenO
>
>At 06:22 AM 10/5/2000 +0000, you wrote:
>>Frame is a reserved word and may be the culprit...
>>
>>tom mallard
>>seattle
>>-----Original Message-----
>>From: Ben Ocean <lists(at)TheWebsons.com>
>>To: javascript(at)LaTech.edu <javascript(at)LaTech.edu>
>>Cc: hwg-languages(at)hwg.org <hwg-languages(at)hwg.org>
>>Date: Thursday, October 05, 2000 7:38 AM
>>Subject: More Troubles, First JavaScript Script
>>
>>
>> >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