Re: Need help with Netscape DOM - fixed that, added another problem

by "Rossi Designs" <webmaster(at)rossidesigns.net>

 Date:  Wed, 31 May 2000 16:44:55 -0400
 To:  "Wise Lisa M Civ 355 TRS/RTS" <Lisa.Wise(at)dm.af.mil>,
"Jim Coffield" <coffield(at)cet.edu>,
<hwg-languages(at)hwg.org>
 References:  af
  todo: View Thread, Original
you can add onmouseover events with a script also

document.imagename.onmouseover="code_to_run";

you might make a function that adds all your mouseovers and call it with the
body onload event.

Rossi Designs
PO Box 1084
Holly Hill, FL 32125-1084
Phone : (904) 226-8979
URL : http://rossidesigns.net
----- Original Message -----
From: Wise Lisa M Civ 355 TRS/RTS <Lisa.Wise(at)dm.af.mil>
To: Jim Coffield <coffield(at)cet.edu>; <hwg-languages(at)hwg.org>
Sent: Wednesday, May 31, 2000 3:42 PM
Subject: RE: Need help with Netscape DOM - fixed that, added another problem


| Jim,
| BIG HUGE THANK YOU! That did the trick, I put a blank gif there initially,
| then swapped them with the load function.
|
| One problem, though, since the blank gifs have rollover functions, if
| someone accidentally passes over them before the buttons are loaded, the
| mouseover images show immediately - obviously defeating the "cool" look of
| the sequential loading.  Can anyone think of a way to get around that?
|
| ***********************************************************
| Lisa Wise
| www.declareit.com (It's almost ready for its debut!)
| **********************************************************
|
|
| -----Original Message-----
| From: Jim Coffield [mailto:coffield(at)cet.edu]
| Sent: Friday, May 26, 2000 5:03 PM
| To: Wise Lisa M Civ 355 TRS/RTS; hwg-languages(at)hwg.org
| Subject: Re: Need help with Netscape DOM
|
|
| Hi,
|
| I looked at your page. If you take the images out of the table and use
| <div> tags with absolute positioning it works fine (but does not look very
| good unless you position all of the elements with style sheets).  I have
| tried to avoid using relatively positioned layers in Netscape and always
| have my absolutely positioned layers isolated (ie. not within tables, or
| forms, etc. though you can put tables and forms within the layers). This
| does not mean it can't be done, I just don't know how. In the case of your
| page, I don't really see the need of adding the complication of layers.
The
| following code produces the same affect with only image swaps.
|
| (api.js)
|
| file://rollover functions
|
| function imgDn(imgName) {
|
|   if (document.images) {
|     document.images[imgName].src = eval(imgName + "dn.src");
|
| }
| }
|
| function imgUp(imgName) {
|
|   if (document.images) {
|     document.images[imgName].src = eval(imgName + "up.src");
|    }
| }
|
| file://end rollover functions
|
| (navLoad.js)
|
| Time = new Array();
| Seq = new Array();
| Seq[0] = new Array();
| Seq[0][1]="begin();";
| Seq[0][10]="imgDn('img1');";
| Seq[0][14]="imgUp('img1');";
| Seq[0][15]="imgDn('img2');";
| Seq[0][19]="imgUp('img2');";
| Seq[0][20]="imgDn('img3');";
| Seq[0][24]="imgUp('img3');";
| Seq[0][25]="imgDn('img4');";
| Seq[0][29]="imgUp('img4');";
| Seq[0][30]="imgDn('img5');";
| Seq[0][34]="imgUp('img5');";
|
| (index.shtml)
|
| <TD><A  href="webservices.shtml" onMouseOut="imgUp('img1')"
| onMouseOver="imgDn('img1')"><IMG src="images/blank.gif" width="110"
| height="20" NAME="img1" BORDER="0" ALT="Click to go to Web
| Services"></A></TD>
|         </TR>
|         <TR>
|           <TD>&nbsp;</TD>
|         </TR>
|         <TR>
|
|     <TD><A HREF="copyservices.shtml" onMouseOut="imgUp('img2')"
| onMouseOver="imgDn('img2')"><IMG SRC="images/blank.gif" WIDTH="110"
| HEIGHT="20" NAME="img2" BORDER="0" ALT="Click to go to Copy
| Services"></A></TD>
|         </TR>
|         <TR>
|           <TD>&nbsp;</TD>
|         </TR>
|         <TR>
|
| ...etc.
|
|
|
| -Where blank.gif is a transparent gif the same size as your other images.
|
| I hope this helps.
|
| Jim
|
| >Hi, new to this list and I need some help.
| >
| >Need help with a Netscape specific problem.  My script shows each
button's
| >lit-up state, then swaps its source to the un-lit state, then does the
same
| >thing to the next button and so on.  It works in IE, but not in Netscape.
| >I've narrowed the problem to:    The anchor tag around the image has an
ID
| >to make it work properly and Netscape then doesn't find the image using
| >"document.[imgName]"    When I take out the ID, the rollover works, but
not
| >the loading script. I also tried accessing it with
| >"document.layers[imgName]", but that didn't work either.
| >
| >You can see the page at http://64.33.80.168/ which calls the external
| >javaScript files.  The image swap functions in question are in "api.js"
and
| >the sequence function that calls the show and swap are in "navload.js"
| >
| >Any help you can provide would be GREATLY appreciated (keep it simple,
| >though, because I'm still a scripting newbie).  By the way, any other
| >thoughts and comments on my site are more than welcomed.
| >
|
>***************************************************************************
| *
| >*******************************
| >Lisa Wise
| >DeclareIt.com  - http://64.33.80.168
| >" Computers are useless. They can only give you answers."  -   Pablo
| Picasso
| >(1881-1973)
|
|
| James E. Coffield, Ph.D.
| Research Associate
| Center for Educational Technologies/
| NASA Classroom of the Future
| Wheeling Jesuit University
| 316 Washington Avenue
| Wheeling, WV  26003
| Phone (304) 243-2469      Fax: 304-243-2497
| WWW address:  http://www.cet.edu/
| email: coffield(at)cet.edu
|
|
|

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA