|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
Thanks, James B. |
|
#2
|
|||
|
|||
|
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.
<HTML> <HEAD> <TITLE>Simple Image Rollover</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT> <!--// /* 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" } //--> </SCRIPT> </HEAD> <BODY> <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> </BODY> </HTML> 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: onMouseover="parent.framename.document.rollover.src=image2.src" 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);" Spookster ![]() Any further questions please direct to my regular forum at: WSAbstract Web Design Forum |
|
#3
|
|||
|
|||
|
I have a small roll over script (under 300 bytes) which may help you out.
http://www.dhtml.org.uk/sirog (Some small bugs are known about and will be fixed shortly) |
|
#4
|
|||
|
|||
|
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" width=108></A></DIV> 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. |
|
#5
|
|||
|
|||
|
Argrajoca,
Thanks that worked. Thank you, every one. --Jim |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Rollover problems in NS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|