HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 22nd, 2000, 09:22 PM
ONoff ONoff is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Posts: 2 ONoff Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ONoff
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.

Reply With Quote
  #2  
Old February 22nd, 2000, 10:37 PM
Spookster Spookster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Posts: 84 Spookster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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

Reply With Quote
  #3  
Old February 23rd, 2000, 08:40 AM
dynamic1 dynamic1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 1999
Location: Norfolk, UK
Posts: 16 dynamic1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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)

Reply With Quote
  #4  
Old February 24th, 2000, 12:40 PM
Argrajoca Argrajoca is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: SPAIN
Posts: 47 Argrajoca User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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.

Reply With Quote
  #5  
Old February 24th, 2000, 04:36 PM
ONoff ONoff is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Posts: 2 ONoff Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ONoff
Argrajoca,
Thanks that worked.

Thank you, every one.

--Jim
Comments on this post
haid disagrees!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Rollover problems in NS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT