Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 817123 - Last Review: February 1, 2007 - Revision: 3.4
Interactive buttons on a Web page do not display the correct image when you click or rest the pointer over the button in FrontPage 2003
In FrontPage 2003, Web pages contain a set of interactive
buttons that link to other Web pages. However, the interactive buttons never
appear to be "pressed" or active. This means that you cannot determine which
page is active because each button appears to be in the same (not pressed)
state.
To work around this issue, edit the button script. To do so,
use one of the following methods.
Method 1: Edit the Path of the Button to Point to the Correct Image of the Button
- Double-click the button, and then click the
Image tab.
- Click to select the following check boxes:
- Create hover image
- Create pressed image
- Preload button images
This step creates and saves a copy of three separate images
of each button that is created: the hover image, the pressed image, and the
default image (not pressed). - Click OK.
- Click Code in the lower-left corner to
edit the code.
- Locate the code that is similar to the following, where
File Path is the file that contains the image of the
button:
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'file:File Path"
- Edit the file path to point to the file that contains the
image of the "pressed" button that was created in step 2.
Method 2: Add Script to the Buttons
- Add the following code block under <script> in the
<head> section of your HTML document:
function pressBtnIfActive( id )
{
id = "document.getElementById('" + id + "')";
if( !document.getElementById ||
!document.body.parentNode ||
!eval( id ) )
return;
if( document.location == eval( id + ".parentNode.href" ) )
{
eval( id + ".onmousedown()" );
eval( id + ".onmousedown=null" );
eval( id + ".onmouseover=null" );
eval( id + ".onmouseout=null" );
eval( id + ".onmouseup=null" );
}
}
- Add the following code block to the <body> section of
your HTML document under the following line of code, where Image 1 and Image 2
are the file names that the button images are saved under:
pressBtnIfActive( Image 1 );
pressBtnIfActive( Image 2 );
- Save your changes, and then click the interactive
button.
Microsoft has confirmed that this is a bug in the Microsoft
products that are listed in the "Applies to"
section.
APPLIES TO
- Microsoft Office FrontPage 2003
| kbcode kbhtml kbbug KB817123 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate