Internet Explorer does not load the Hover button ActiveX control after you install security update 912812 in FrontPage 2003 (922480)
The information in this article applies to:
- Microsoft Office FrontPage 2003
SYMPTOMS
Consider the following scenario. You install security update 912812 on your computer. After you do this, Microsoft Internet Explorer does not load the Hover button ActiveX control. Instead, you must click the control placeholder to start and to enable the Hover button control. This problem occurs when you use Microsoft Office FrontPage 2003 to create the Web pages that use the Hover button.
For more information about security update 912812, click the following article number to view the article in the Microsoft Knowledge Base:
912812
MS06-013: Cumulative security update for Internet Explorer
CAUSEThis problem occurs because of changes to COM component handling that are contained in security update 912812. When this update is installed, the APPLET, EMBED, and OBJECT page elements cannot load an ActiveX control. This is especially true of the Hover button control.RESOLUTIONTo resolve this problem, replace the existing Hover buttons in the Web page. To do this, you can use a script that converts these Hover buttons into CSS buttons. CSS buttons function in a similar manner. To do this, follow these steps. Warning The changes that are made by this script cannot be reverted. Make sure that you have a complete backup of the Web site before you run this script. Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. -
In FrontPage 2003, point to Macro on the Tools menu, and then click Visual Basic Editor.
-
In Project Explorer, right-click Modules, point to Insert, and then click Module.
-
In the new module, copy the following lines of code, and then save the module.
Option Explicit
Sub ReplaceHoverButtons()
Dim applet As IHTMLElement
Dim param As IHTMLElement
Dim objHead As IHTMLElement
Dim theWeb As WebEx
Dim webFiles As webFiles
Dim webFile As webFile
Dim buttonText As String
Dim buttonURL As String
Dim buttontarget As String
Dim styleBlock As String
Set theWeb = ActiveWeb
Set webFiles = theWeb.RootFolder.AllFiles
' build the style block with colors that match default hover buttons from sample document
styleBlock ="<style type=""text/css"">" & vbCrLf & _
"#hoverButton {width: 150px;background-color: #FFFFFF;position: relative;" & _
"clear: both;display: inline;font-family:Arial;Helvetica;sans-serif}" & vbCrLf & _
"#hoverButton a {list-style-type: none;width: 100%;margin: 0;" & _
"text-decoration: none;color: #CC6600;" & _
"display:block;padding: 5px;border-bottom: 1px solid #f2f2f2;}" & vbCrLf & _
"#hoverButton a:hover {text-decoration: none;color: #000000;" & _
"border-bottom: 1px solid #f2f2f2;background-color: #FF9933;}" & vbCrLf & _
"</style>"
For Each webFile In webFiles
If webFile.Extension ="htm" Or _
webFile.Extension ="aspx" Or _
webFile.Extension ="asp" Or _
webFile.Extension ="html" Then
' open the file
webFile.Open
' Add style block to each of the pages
Set objHead = ActiveDocument.all.tags("head").Item(0)
Call objHead.insertAdjacentHTML("BeforeEnd", styleBlock)
' loop through the applets to get target, url and text to display
For Each applet In ActiveDocument.all.tags("applet")
' only get the values for hover buttons
If applet.getAttribute("code") ="fphover.class" Then
For Each param In applet.Children
' get the value of the target
If param.getAttribute("name") ="target" Then
buttontarget = param.getAttribute("value")
End If
' get the value of the URL
If param.getAttribute("name") ="url" Then
buttonURL = param.getAttribute("value")
End If
' get the value of the display text
If param.getAttribute("name") ="text" Then
buttonText = param.getAttribute("value")
End If
Next
End If
' replace the applet with new html based on the settings from above
applet.outerHTML ="<span id=""hoverButton""><a href=""" & buttonURL &""" target=""" & buttontarget &""">" & buttonText &"</a></span>"
Next
' save the page - don't worry about the embedded files dialog
ActiveDocument.Save (False)
ActivePageWindow.Close (False)
End If
Next
' uncomment the next line to close the web
'theWeb.Close
End Sub
-
In FrontPage 2003, open the Web site that contains the pages that use Hover buttons.
- On the Tools menu, point to Macro, and then click Macros.
- Click ReplaceHoverButtons in the list of Macros, and then click Run.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 8/3/2006 |
---|
Keywords: | kbScript kbProgramming kbExpertiseBeginner kbprb KB922480 kbAudKnowledgeWorker |
---|
|