473,614 Members | 2,361 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Have I done these rollovers correctly?

I've put together a rough copy of what will be my site's menu bar, but
I'm not sure if I've done the rollovers correctly (I got the code from
HTMLcodetutoria l.com I think). Check the look and code out here -
http://www.sportsunion.strath.ac.uk/...est/index.html

When I roll my mouse over an image, it changes as expected, but in
Mozilla, when I take the mouse away, there is a slight delay before the
image reverts to its original state, which I haven't experienced
elsewhere (looks great in IE though, which 90% of my site's visitors
will be running, no doubt).

Thanks in advance for any input.
LC.

Jul 20 '05 #1
2 2059
Lorne Cameron wrote on 10 aug 2003 in comp.lang.javas cript:
I've put together a rough copy of what will be my site's menu bar, but
I'm not sure if I've done the rollovers correctly (I got the code from
HTMLcodetutoria l.com I think). Check the look and code out here -
http://www.sportsunion.strath.ac.uk/...est/index.html
your code:

<A HREF="" ONMOUSEOVER="im age1.src='1_ove r.gif';"
ONMOUSEOUT="ima ge1.src='1.gif' ;"><IMG NAME="image1" SRC="1.gif"
BORDER="0">

=============== =
The over/out codes are better off in the img declaration
and then can be shorter using "this":

<A HREF="">
<IMG SRC="1.gif" BORDER="0"
ONMOUSEOVER="th is.src='1_over. gif';"
ONMOUSEOUT="thi s.src='1.gif';"</A>
=============== =
you could also use the preloaded var name:

<A HREF="">
<IMG SRC="1.gif" BORDER="0"
ONMOUSEOVER="th is.src=image1.s rc;"
ONMOUSEOUT="thi s.src='1.gif';"</A>
=============== =
or use functions:

<script>
function imgover(x){
x.save=x.src
x.src=x.id.subs tr(3)+"_over.gi f"
}
function imgout(x){
x.src=x.save
}
</script>

<A HREF="">
<IMG SRC="1.gif" BORDER="0" id="gif1"
ONMOUSEOVER="im gover(this)"
ONMOUSEOUT="img out(this)"</A>


not tested
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #2
Lorne Cameron wrote on 10 aug 2003 in comp.lang.javas cript:
I've put together a rough copy of what will be my site's menu bar, but
I'm not sure if I've done the rollovers correctly (I got the code from
HTMLcodetutoria l.com I think). Check the look and code out here -
http://www.sportsunion.strath.ac.uk/...est/index.html
your code:

<A HREF="" ONMOUSEOVER="im age1.src='1_ove r.gif';"
ONMOUSEOUT="ima ge1.src='1.gif' ;"><IMG NAME="image1" SRC="1.gif"
BORDER="0">

=============== =
The over/out codes are better off in the img declaration
and then can be shorter using "this":

<A HREF="">
<IMG SRC="1.gif" BORDER="0"
ONMOUSEOVER="th is.src='1_over. gif';"
ONMOUSEOUT="thi s.src='1.gif';"</A>
=============== =
you could also use the preloaded var name:

<A HREF="">
<IMG SRC="1.gif" BORDER="0"
ONMOUSEOVER="th is.src=image1.s rc;"
ONMOUSEOUT="thi s.src='1.gif';"</A>
=============== =
or use functions:

<script>
function imgover(x){
x.save=x.src
x.src=x.id.subs tr(3)+"_over.gi f"
}
function imgout(x){
x.src=x.save
}
</script>

<A HREF="">
<IMG SRC="1.gif" BORDER="0" id="gif1"
ONMOUSEOVER="im gover(this)"
ONMOUSEOUT="img out(this)"</A>


not tested
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4376
by: Susan Addams | last post by:
The website I'm working on is using a graphic image for the left navigation scheme. Say I've got a button called "home" and one called "home_rollover" where it's a lighter shade Is there a way to use css to call the switch between the two? Would hover work for this? I know very little about it. If so, what would the code be? Thanks! :)
3
1497
by: Norman Swartz | last post by:
Rollovers on a web page I created were instantaneous on my computer when the page was loaded directly from my hard drive, but were painfully slow when loaded from the web. However, on another computer the rollovers were speedy when connected to the web. Eventually I found that one of the settings in IE accounted for the difference. In the menu Tools/Internet Options/General/Settings change from "Every visit to the page" to...
3
2155
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... I am trying to write a webpage in Javascript. The page loads with three frames, a top, left and right frame. Depending on the users actions the background page rewrites the code for the relevant frames.
19
2417
by: gallery | last post by:
I read somewhere that you can get Tim Murtaugh's Mo' Betta Rollovers to work in Firefox using just CSS (no javascript) . Can someone tell me how to do it? http://www.alistapart.com/articles/rollovers/
14
1884
by: webguru | last post by:
Okay, In the comps.language.javascript newsgroup, I was convinced to use CSS Rollovers instead of javascript. The first rollover went great. Although I can't get the text to align vertically in the middle, It's a much cleaner way to do it and it works okay. However, my second rollover is not as good. This one has no text over the button, and the CSS looks like this: a.go:link{
3
1692
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Why are my Rollovers so slow? ----------------------------------------------------------------------- Images are cached by the browser depending on the headers sent by the server. If the server does not send sufficient information for the browser to decide the image is cacheable, the browser will check if the image has been updated everytime you change...
5
1875
by: Dinsdale | last post by:
Without using CSS styles or linked stylesheets, I need to apply formatting to text links that use rollover effects. I can NOT get the underline to show using this technique: <A onmouseover="this.style.color='#000000'" style="FONT-SIZE: 12pt; COLOR: #000000; FONT-FAMILY: Arial, Helvetica; TEXT-DECORATION: underline;" onmouseout="this.style.color='#000000' TEXT-DECORATION: none;" href="#">Search</A>
1
339
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Why are my rollovers so slow? ----------------------------------------------------------------------- Images are cached by the browser depending on the headers sent by the server. If the server does not send sufficient information for the browser to decide the image is cacheable, the browser will check if the image has been updated everytime you change...
1
1381
by: luggi | last post by:
See code here: http://lsquareddesigns.com/som/collectivemedia/landing/test1.html At the bottom, as soon as i add rollovers, the margins are getting messed up but only in firefox. can someone help?? thanks, laura
0
8124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8621
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8272
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8427
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6087
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5538
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4049
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4119
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1421
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.