#87264 - 2002-08-14 07:32 PM
IE COM object won't display inline images
|
operagost
Fresh Scripter
Registered: 2002-07-05
Posts: 13
|
I shamelessly reused and modified a UDF posted here to create a change password dialog in IE. I wanted a simple informational window to tell the user where they logged in, but messagebox() wasn't cutting it because sometimes a mystery app would steal focus and cause the box to never time out. So, I stripped out the forms and put what was left in my script. Everything works except a company logo I placed inline. If I run the script locally, it's okay, but when I run it on logon the image doesn't appear. This happens no matter how I address it:
file:///@ldrive\logon-banner.gif http://our.intra.net/logon-banner.gif @ldrive\logon-banner.gif %systemroot%\logon-banner.gif (after copying to local drive)
Is there some sort of security problem I need to address here?
code:
DIM $title, $top, $left, $height, $Width, $False, $true DIM $status, $doc, $nul, $html
$top = "320" $left = "200" $height = "120" $width = "300" $false = 0 $true = -1 $title = "Welcome, $fullname." $msg = "You have logged onto $domain, $site." $html= '<html> <head> <title>$title</title> <style> <!--body{ background-color: mediumblue; color: white;font-family: baskerville old face, arial;
font-size: 11pt; margin: 3px }input.tbox { border: lpx black solid;}td { font: 11 pt baskerville old face;
}---> </style> </head>
<body scroll=no onresize="window.resizeto(300,120);" > <img src="file:///@ldrive\logon-banner.gif" height=51 width=166 alt=""> <br> $msg </font> </body> </html>'
$ie = CreateObject("internetexplorer.application")
; Set properties and display form ... $ie.addressbar = $false $ie.menubar = $false $ie.toolbar = $false $ie.statusbar = $false $ie.resizable = $false $ie.top = $top $ie.left = $left $ie.height = $height $ie.width = $width $ie.visible = $true
$ie.navigate("about:blank")
; Get a handle to the open document ... $doc = $ie.document $doc.write($html)
color w+/b gosub getparent gosub sync gosub home gosub files gosub printers
$ie.quit()
|
|
Top
|
|
|
|
#87267 - 2002-08-15 06:29 PM
Re: IE COM object won't display inline images
|
operagost
Fresh Scripter
Registered: 2002-07-05
Posts: 13
|
Thanks Shawn. I actually decided that some Kixgui mojo would be more useful for us. I modified one of the progress indicator scripts to put the logo on the left and text/bar on the right. It comes up more quickly than the IE window, as well.
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 1619 anonymous users online.
|
|
|