1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Rep Power
    I am using layers with this web page and rollovers created with Dreamweaver 3. the page works great in IE, however, when opened with NS the rollovers stick or dont work at all. I dont know that much about HTML, so If anyone can look at the pga eand help out I would apreciate it. http://expert.cc.purdue.edu/~apo/Main/default.htm

    James B.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Rep Power
    Dreamweaver uses excessive amounts of coding to do an image rollover. I wrote something that does the same thing but mine is much simpler and is cross browser compatible.

    <TITLE>Simple Image Rollover</TITLE>
    /* Author: Spookster
    * Email: ts_spook@hotmail.com
    * Description: This script will preload your images and allow you to
    * produce a dynamic rollover effect.

    // This statement detects if the browser supports the image object
    if (document.images) {

    //This section instantiates or creates the image objects
    //You can also add the width and height of the images inside the parentheses seperated by a comma
    image1 = new Image();
    image2 = new Image();

    //This section specifies the location or url of the images to be used
    image1.src = "image1.jpg"
    image2.src = "image2.jpg"

    <A HREF="somewhere.html" onMouseover="document.rollover.src=image2.src" onMouseout="document.rollover.src=image1.src">
    <IMG SRC="image1.jpg" border="0" name="rollover"></A>

    To produce the rollover effect you will use the onMouseove/onMouseout event
    handlers. You must give your image tag an id. To do that you will just add the
    name attribute(ie. <img name="myimage"> ) inside of the image tag. Then
    refer to the image you would use "document" which refers to the page that the
    image tag resides in followed by a period and the you type the name you gave
    to the image with the name attribute and then another period and type "src=".
    The src is what you assigned to the location of the image to be changed back
    in the script(ie. image1.src). If you wanted to change an image located in
    another frame then the statement in your onMouse event handler would look
    something like this:
    You will just need to add a path to the other image. In this case you refer to the
    parent window and the the framename and then continue the statement as usual.
    One final note- In the HREF if you want an actual link to another page then just
    put the link in there. If you do not want to link to another page then you can
    just use the following to disable the HREF portion: HREF="javascript:void(null);"


    Any further questions please direct to my regular forum at:

    WSAbstract Web Design Forum
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 1999
    Norfolk, UK
    Rep Power
    I have a small roll over script (under 300 bytes) which may help you out.

    (Some small bugs are known about and will be fixed shortly)
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Rep Power
    There's a better solution to correct the problem whitout having to edit the HTML file: I've noticed in your page that most of the images have the same name that the layer containing it (look at the #):

    <DIV #####id=Service#####
    <IMG alt=Service border=0 height=28 #####name=Service##### src="Alpha Phi_archivos/service-in.gif"

    Netscape gets confused with this , and ignores some functions. All that you have to do is change the name of the layer: you can easily do it in the Properties window of Dreamweaver. I've tried it with your page and it works.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Rep Power
    Thanks that worked.

    Thank you, every one.


    Comments on this post

    • haid disagrees

Similar Threads

  1. rollover problems...
    By hobbes166 in forum HTML Programming
    Replies: 3
    Last Post: February 16th, 2004, 11:01 PM
  2. Replies: 0
    Last Post: August 26th, 2003, 07:50 PM
  3. frames with rollover problems in Netscape???
    By cstephenson in forum HTML Programming
    Replies: 1
    Last Post: February 27th, 2002, 10:30 AM
  4. table rollover effect
    By Garrett_44 in forum HTML Programming
    Replies: 10
    Last Post: September 28th, 2001, 05:39 AM
  5. Problems with JavaScript rollover images
    By asuzuki in forum JavaScript Development
    Replies: 0
    Last Post: December 14th, 2000, 10:44 AM

IMN logo majestic logo threadwatch logo seochat tools logo