W
WCHull
Flightless Bird
We discovered an issue with some inbedded VBScript code inside an HTA written by a developer that is no longer with us. The code work in IE6 but error out on the set objMsgArea statement indicating that the object requires 'objMenuFrame' which should have been set in the previous line of code. If I put in an 'On Error Resume Next" statement in that sub the HTA appears to work correctly however I don't like putting a band-aid on something like this. Does anyone have any solution for this? Here's the code:
sub AppStatusDisplay(strMsgIn, bolAddToStatusLogIn)
strCalledFromFunction = strFunctionName
strFunctionName = "ADA-CommonFunctions:AppStatusDisplay"
if bolAddToStatusLogIn then
AppStatus strMsgIn
end if
strAppMessage = strMsgIn
set objParent = self.parent
if varType(objParent) = vbObject then
set objMenuFrame = self.parent.document.getElementById("ifrMenuFrame")
set objMsgArea = objMenuFrame.contentWindow.document.getElementById("divScriptMessage")
else
set objMsgArea = divStatus
end if
objMsgArea.Innertext = strMsgIn
call ExecCommand("")
strFunctionName = strCalledFromFunction
end sub
---
frmsrcurl: http://msgroups.net/microsoft.public.internetexplorer.general/
sub AppStatusDisplay(strMsgIn, bolAddToStatusLogIn)
strCalledFromFunction = strFunctionName
strFunctionName = "ADA-CommonFunctions:AppStatusDisplay"
if bolAddToStatusLogIn then
AppStatus strMsgIn
end if
strAppMessage = strMsgIn
set objParent = self.parent
if varType(objParent) = vbObject then
set objMenuFrame = self.parent.document.getElementById("ifrMenuFrame")
set objMsgArea = objMenuFrame.contentWindow.document.getElementById("divScriptMessage")
else
set objMsgArea = divStatus
end if
objMsgArea.Innertext = strMsgIn
call ExecCommand("")
strFunctionName = strCalledFromFunction
end sub
---
frmsrcurl: http://msgroups.net/microsoft.public.internetexplorer.general/