I have this code that I want to use to do a rollover. However, because the
company I am doing it for is continually changing the text, I want to be
able to use dynamic text to change the text on the fly, and still have the
rollover work. I have taken the text off of the buttons, but cannot figure
out how to do it with dynamic text using javascript and html.
For example, in the columns of this row, I want to put "About
Us","Warranty", "Insurance","Sp ecials","Tools" , and "Tips" respectively. I
can change the primary image to be the background of the cell, but then how
do I change the image for the rollover? If I leave the rollover as it is,
how do I place the dynamic text over the image? Is there a way in
Javascript to write on the canvas of the image? I have no idea, and any
help would greatly be appreciated! Thanks!
<TR>
<TD COLSPAN=5>
<a href="about.htm l" onMouseOut="MM_ swapImgRestore( )"
onMouseOver="MM _swapImage('Hom e_01','','image s/home_01_over.jp g',1)"><img
src="images/Home_01.jpg" alt="ABOUT US" name="Home_01" width="90"
height="30" border="0"></a>
</TD>
<TD COLSPAN=3>
<a href="warranty. html" onMouseOut="MM_ swapImgRestore( )"
onMouseOver="MM _swapImage('Hom e_02','','image s/home_02_over.jp g',1)"><img
src="images/Home_02.jpg" alt="WARRANTY" name="Home_02" width="90"
height="30" border="0"></a>
</TD>
<TD COLSPAN=4>
<a href="#" onMouseOut="MM_ swapImgRestore( )"
onMouseOver="MM _swapImage('Hom e_03','','image s/home_03_over.jp g',1)"><img
src="images/Home_03.jpg" alt="INSURANCE" name="Home_03" width="90"
height="30" border="0"></a>
</TD>
<TD COLSPAN=3>
<a href="#" onMouseOut="MM_ swapImgRestore( )"
onMouseOver="MM _swapImage('Hom e_04','','image s/home_04_over.jp g',1)"><img
src="images/Home_04.jpg" alt="THE A-TEAM" name="Home_04" width="90"
height="30" border="0"></a>
</TD>
<TD COLSPAN=4>
<a href="#" onMouseOut="MM_ swapImgRestore( )"
onMouseOver="MM _swapImage('Hom e_05','','image s/home_05_over.jp g',1)"><img
src="images/Home_05.jpg" alt="BUYER TOOLS" name="Home_05" width="90"
height="30" border="0"></a>
</TD>
<TD COLSPAN=4>
<a href="#" onMouseOut="MM_ swapImgRestore( )"
onMouseOver="MM _swapImage('Hom e_06','','image s/home_06_over.jp g',1)"><img
src="images/Home_06.jpg" alt="BUYING TIPS" name="Home_06" width="90"
height="30" border="0"></a>
</TD> 3 2707
JOSEPHINE ALVAREZ wrote: I have this code that I want to use to do a rollover. However, because the company I am doing it for is continually changing the text, I want to be able to use dynamic text to change the text on the fly, and still have the rollover work. I have taken the text off of the buttons, but cannot figure out how to do it with dynamic text using javascript and html.
For example, in the columns of this row, I want to put "About Us","Warranty", "Insurance","Sp ecials","Tools" , and "Tips" respectively. I can change the primary image to be the background of the cell, but then how do I change the image for the rollover? If I leave the rollover as it is, how do I place the dynamic text over the image? Is there a way in Javascript to write on the canvas of the image? I have no idea, and any help would greatly be appreciated! Thanks!
Don't use JavaScript at all (especially that dreadful old MM_ stuff),
use CSS.
See if this does the job:
<html><head><ti tle>Link play</title>
<style type="text/css">
A:link {
text-decoration: none;
text-align: center;
line-height: 2em;
display: block;
width: 90px;
height: 30px;
border: 2px solid green;
background-image: url('images/home_01.jpg');
}
A:visited {
text-decoration: none
}
A:active {
text-decoration: none
}
A:hover {
text-decoration: underline;
color: red;
background-image: url('images/home_01_over.jp g');
}
</style>
</head>
<body>
<a href="#">Link text</a>
</body></html>
If you need any help with the CSS, post in
comp.infosystem s. www.authoring.stylesheets
[...]
--
Rob
I agree, but look into a css rollover that changes position, (and put
both over and out images into one), this way you will require no image
preloading.
Cheers
Ian www.boan-design.co.uk This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: NONYA |
last post by:
Is it possible for me to to the following:
1. I want to limit the amount of pix on my site as much as possbile.
2. I want to create menu with text links such as: about us, contact,
etc....
3. I want it so that when someone rolls over "about us" that another
line of text appears below it that says: "Who we are."
I can do this with images but I want to be able to do it with just
text and maybe css.
|
by: jedbob |
last post by:
I used Adobe Imageready to build a simple rollover navigation bar,
where the text will change color on a mouse over.
The working example can be found at:
http://www.akujunkan.com/test/NavBar.html
However, when I try to incorporate the javascript and code into another
table, the rollover stops working:
http://www.akujunkan.com/test/index.html
|
by: AJBopp |
last post by:
I'm wrestling with CSS variations between Firefox and IE. I'm trying to
create rollover buttons in a menu frame. It is working perfectly in
Firefox but in IE only the first button is properly highlighted and
linked. The second button, has only a partial "hit area" at the top of
the image, although if you click the link, you can see the link border
is properly place around the image. The rest of the buttons have no
rolloever state or link...
|
by: Doug |
last post by:
Using ASP.NET, is this possible? All I want is something simple, like
bold-facing the text.
An alternative would be to use plain text links (IE 6.0, so we can rely
on CSS and the anchor hover).
Maybe there's a 3rd party control out there that does this? Possible
to make your own? Thoughts? Thanks.
|
by: mix2plix |
last post by:
ok.. been bangin by brains the past few days with this one and decided
to seek you'z help. so here ya go. based on the code below and this
concept.. how should i proceed?
I have a table of 4 equal squares in which i've placed 4 equal sized
pictures. now i'd like to create a link on the 4 pictures and have
them change pictures when the mouse is over them. (rollover)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">...
| |
by: daJunkCollector |
last post by:
I wrote the following script. I have a movieclip named countyA_mc. I want the user to mouse over this movie clip, and result in the sending of a variable to the middle tier.
I can establish communication when I use a .click event listener on a button component, but when I attempt to convert the script (in the following logical way) I do not establish communication with the aspx page:
var hoverColor:Number = 0x9A9A9A;
var...
|
by: eholz1 |
last post by:
Hello CSS and StyleSheet members,
I have decided to move away from Dreamweaver javascript rollover
buttons, in favor of
a CSS type rollover button. (hope that is ok).
I plan to use PHP to include the page with the rollover buttons as a
php include in a
div for navigation buttons (left side of web page). I have cobbled
together some code complements of http://sophie-g.net/jobs/css/e_buttons.htm.
|
by: Jim in Arizona |
last post by:
using ASP.NET/VB.NET 2.0
I can change the text color of an ASP Button object on mouse
rollover/rollout by doing this (in page_load)
btnMyButton.Attributes.Add("onmouseover", "this.style.color='Yellow'")
btnMyButton.Attributes.Add("onmouseout", "this.style.color='White'")
But how can I change the text on rollover? I don't understand the javascript
DOM enough to know what to do. I did try:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |