button behavior

  • Thread starter Thread starter jvles
  • Start date Start date
J

jvles

I have the following code for one of my buttons. Everything works
perfectly, except that when the mouse gets off the button, the color of
the button doesn't change (most of the time, sometimes it does...):

<td valign="top"><a href="collections.htm">
<img border="0" id="img5" src="images/button1C.jpg" height="20"
width="100" alt="Collections" fp-style="fp-btn: Simple Text 1; fp-font:
Verdana; fp-font-color-normal: #C0C0C0; fp-font-color-hover: #CC3300;
fp-font-color-press: #C0C0C0; fp-img-press: 0; fp-preload: 0"
fp-title="Collections"
onmouseover="FP_swapImg(0,0,/*id*/'img5',/*url*/'images/button1D.jpg')"
onmouseout="FP_swapImg(0,0,/*id*/'img5',/*url*/'images/button1C.jpg')"></a></td>
 
If published post a URL to the page

--




| I have the following code for one of my buttons. Everything works
| perfectly, except that when the mouse gets off the button, the color of
| the button doesn't change (most of the time, sometimes it does...):
|
| <td valign="top"><a href="collections.htm">
| <img border="0" id="img5" src="images/button1C.jpg" height="20"
| width="100" alt="Collections" fp-style="fp-btn: Simple Text 1; fp-font:
| Verdana; fp-font-color-normal: #C0C0C0; fp-font-color-hover: #CC3300;
| fp-font-color-press: #C0C0C0; fp-img-press: 0; fp-preload: 0"
| fp-title="Collections"
| onmouseover="FP_swapImg(0,0,/*id*/'img5',/*url*/'images/button1D.jpg')"
| onmouseout="FP_swapImg(0,0,/*id*/'img5',/*url*/'images/button1C.jpg')"></a></td>
|
 
I suspect it you onbody mouseout preventing the swap
<body topmargin="0" leftmargin="0"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/latifa_front_page_button_collections_red.jpg');
FP_swapImg(1,1,/*id*/'img1',/*url*/'images/latifa_front_page_button_collections_red.jpg')" onmouseout="FP_swapImgRestore()"
onload="FP_preloadImgs(/*url*/'images/latifa_front_page_button_collections_red.jpg')">

Remove it and test the IB

--




| here's the URL:
|
| http://www.pier34solutions.com/latifadesign
|
 
Stefan,
Thanks. I'll show you the code I changed it to, and it works.
<body topmargin="0"
leftmargin="0"onload="FP_preloadImgs(/*url*/'images/latifa_front_page_button_collections_red.jpg')">
My question is: why??? In fact, the code was entirely "Microsoft
generated" in its original form!
Now another question: this site is over a hundred pages. Is there any
tool I can use to change this code everywhere?
Thank for your help.
Regards.
Joe
 
The 1st code you had was generating a mouse over/out event that affected the whole page, thus overriding the individual events for
the buttons
- probably because that's the behavior you selected initially
Now you are just preloading an image for your mouse over of an image on the page (but there is no behavior set up for that image
(latifa_logo_front_page.jpg)
- but you are not preloading the IB mouseover images

Recommend changing the body tag to just <body topmargin="0">
Then editing your IB properties to include Preloads of your IB mouseover images (on the image tab)
Then selecting the image tag for latifa_logo_front_page.jpg on your page and creating a mouseover behavior for that image
--




| Stefan,
| Thanks. I'll show you the code I changed it to, and it works.
| <body topmargin="0"
| leftmargin="0"onload="FP_preloadImgs(/*url*/'images/latifa_front_page_button_collections_red.jpg')">
| My question is: why??? In fact, the code was entirely "Microsoft
| generated" in its original form!
| Now another question: this site is over a hundred pages. Is there any
| tool I can use to change this code everywhere?
| Thank for your help.
| Regards.
| Joe
|
 
Back
Top