Microsoft KB Archive/817123

= 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 =

Article ID: 817123

Article Last Modified on 2/1/2007

-

APPLIES TO


 * Microsoft Office FrontPage 2003

-



SYMPTOMS
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 &quot;pressed&quot; or active. This means that you cannot determine which page is active because each button appears to be in the same (not pressed) state.



RESOLUTION
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.</li> Click Code in the lower-left corner to edit the code.</li>  Locate the code that is similar to the following, where  is the file that contains the image of the button: onmousedown=&quot;FP_swapImg(1,0,/*id*/'img1',/*url*/'file:File Path&quot; </li> Edit the file path to point to the file that contains the image of the &quot;pressed&quot; button that was created in step 2.</li></ol>

Method 2: Add Script to the Buttons
<ol>  Add the following code block under in the section of your HTML document: function pressBtnIfActive( id ) { id = &quot;document.getElementById('&quot; + id + &quot;')&quot;;

if( !document.getElementById || !document.body.parentNode ||  !eval( id ) ) return;

if( document.location == eval( id + &quot;.parentNode.href&quot; ) ) { eval( id + &quot;.onmousedown&quot; ); eval( id + &quot;.onmousedown=null&quot; ); eval( id + &quot;.onmouseover=null&quot; ); eval( id + &quot;.onmouseout=null&quot; ); eval( id + &quot;.onmouseup=null&quot; ); } } </li>  Add the following code block to the 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: FP_Preload pressBtnIfActive( Image 1 ); pressBtnIfActive( Image 2 ); </li> Save your changes, and then click the interactive button.</li></ol>

<div class="status_section">

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Additional query words: Front Page FP2003 FP 2003 11

Keywords: kbcode kbhtml kbbug KB817123

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.