Monday, September 2, 2013

internet explorer 10 frame correction in web interface code

Hi,

I created a web interface to manage most of my vbs/wsh scripts

With the arrival of internet explorer 10, my frames were empty

So, in any of my script that use the web interface, change thoses lines:

set flef = oie.document.frames("left").document 
set fmid = oie.document.frames("middle").document 
set fbot = oie.document.frames("bottom").document

For these lines:

fileversion = objFSO.GetFileVersion("C:\program files\internet explorer\iexplore.exe")
finddot = instr(fileversion,".")
fileversion2 = left(fileversion,finddot-1)

if fileversion2 = "10" or fileversion2 = "11"  then
'=== ie10 frame access
set flef = oie.parent.document.getElementByid("left").contentdocument
set fmid = oie.parent.document.getElementByid("middle").contentdocument
set fbot = oie.parent.document.getElementByid("bottom").contentdocument
else
set flef = oie.document.frames("left").document
set fmid = oie.document.frames("middle").document
set fbot = oie.document.frames("bottom").document
end if



No comments:

Post a Comment