#189440 - 2008-09-04 07:04 PM
KIX GUI logon script
|
Ethanous
Fresh Scripter
Registered: 2008-09-04
Posts: 8
|
I have a logon script that brings up an IE page that uese Document.getElementByID and InnterHTML to update the content of the IE page as users log in. (Basicaly its a progress page so users know what is going on with the logon script.) It is working perfectly on XP, but in Vista, the IE page pops up, but the information never changes. I can post a sample of the code here if it helps, but does anyone else have this issue?
|
Top
|
|
|
|
#189483 - 2008-09-05 06:00 PM
Re: KIX GUI logon script
[Re: Lonkero]
|
Ethanous
Fresh Scripter
Registered: 2008-09-04
Posts: 8
|
The script doesn't actually call a web server. It does however call a html webpage vis \\servername\logon.htm then tries to update the text in the div areas. The form its self comes up, but the text never changes.
|
Top
|
|
|
|
#189487 - 2008-09-05 10:07 PM
Re: KIX GUI logon script
[Re: Shawn]
|
Ethanous
Fresh Scripter
Registered: 2008-09-04
Posts: 8
|
below is the text for the .kix file
;---------------------------
;************************************************************************
;***** Safety Tip of the Week *****
;***** If this is set the the ON option, in the place of the *****
;***** username, workstation name, and operating system, a box *****
;***** with the message you specify below will appear. Message is *****
;***** in HTML format. *****
;************************************************************************
$SafetyTipStatus = "" ;Set to either ON or nothing (Case sensitive).
$TipOWeekText = "<center>Safety Tip of the Week:</center>When hiking, know the terrain, water sources, expected weather, and animals in the area. Wear proper hiking boots or shoes, use insect repellant, carry extra food and water, stay hydrated and carry a phone or radio. Don't go alone. Make sure someone knows where you plan to go."
$TipOWeekColor = "#FF6600"
;************************************************************************
;***** Function for GUI Interface *****
;************************************************************************
Function DrawForms()
$SCRIPTPATH = "\\servername\somepath"
; Form
$IE = CreateObject("internetexplorer.application")
If $SafetyTipStatus = "ON"
$IE.Navigate("$SCRIPTPATH\GUI-form\logon2.htm")
$IE.Height = "590"
Else
$IE.Navigate("$SCRIPTPATH\GUI-form\logon.htm")
$IE.Height = "550"
EndIf
WHILE $IE.Busy LOOP
$IE.Document.Title = "Security Scanner"
$IE.Width = "610"
;$IE.Left = ($IE.Document.parentWindow.screen.availWidth / 2) - ($IE.Width / 2) ;Doesn't work with Vista
;$IE.Top = ($IE.Document.parentWindow.screen.availHeight / 2) - ($IE.Height / 2) ;Doesn't work with Vista
$IE.ToolBar = $False
$IE.AddressBar = $False
$IE.MenuBar = $False
$IE.StatusBar = $False
$IE.Resizable = $False
$IE.Visible = $True
$IE.Document.parentWindow.focus();
$FullName = $IE.Document.getElementByID("FullName")
$WKSTA = $IE.Document.getElementByID("WKSTA")
$ProductType = $IE.Document.getElementByID("ProductType")
$TipOWeek = $IE.Document.getElementByID("TipOWeek")
$INFOFPCON = $IE.Document.getElementByID("INFOFPCON")
$TCNO = $IE.Document.getElementByID("TCNO")
$ProgressText = $IE.Document.getElementByID("ProgressText")
$Progress = $IE.Document.getElementByID("Progress")
EndFunction
;************************************************************************
;***** Begin printing info to GUI *****
;************************************************************************
;Default Settings
$progressstep=2
$sleeptime = 0
$numerrors = 0
$TRUE = 1
$FALSE = 0
; Draw Form
DrawForms()
;$FPCONString = Replace($FPCONPRINT, CHR(13), "<br>")
;$INFOCONString = Replace($INFOCONPRINT, CHR(13), "<br>")
;$INFOFPCON.InnerHTML = "$FPCONString <br> $INFOCONString"
$FullName.InnerTEXT = "@FULLNAME"
$WKSTA.InnerTEXT = "@WKSTA"
$ProductType.InnerTEXT = "@ProductType"
$TipOWeek.InnerHTML = '<div id=blinky>$TipOWeekText</div>'
;$ie.document.getElementById("TipOWeek").value = $TipOWeek
$INFOFPCON.InnerTEXT = "Test Information1"
$ProgressText.InnerTEXT = "Test Information1"
;------------------------------------------------ below is the .htm file ;------------------------------------------------
<HTML>
<HEAD>
<STYLE type="text/css">
SPAN { overflow: hidden;
height: 1.2em;
}
body {
background-image: url();
background-color: #CCCCCC;
}
.style1 {font-size: 14px;
}
</STYLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY style="margin: 0px; overflow:hidden;">
<table width="600" border="0" bgcolor="#CCCCCC" class="style1">
<tr>
<td>Logged In As: <span ID="FullName"> </span></td>
</tr>
<tr>
<td>WorkStation Name: <SPAN ID = "WKSTA"> </SPAN></td>
</tr>
<tr>
<td>Operating System: <SPAN ID = "ProductType"> </SPAN></td>
</tr>
<tr>
<td><DIV ID="TCNO" style="height: 7.2em; width:inherit; overflow-y: scroll; border: 1 solid black;">Scanning for Applicable TCNOs: <SPAN ID="Progress">0</SPAN>% <SPAN ID="ProgressText"></SPAN></DIV></td>
</tr>
<tr>
<td><DIV ID="INFOFPCON" style="height: 24.5em; overflow-y: scroll; border: 1 solid black;">FPCON/INFOCON</DIV></td>
</tr>
</table>
</BODY>
</HTML>
Edited by Allen (2008-09-05 10:59 PM) Edit Reason: Added code tags
|
Top
|
|
|
|
#189488 - 2008-09-05 10:08 PM
Re: KIX GUI logon script
[Re: Ethanous]
|
Ethanous
Fresh Scripter
Registered: 2008-09-04
Posts: 8
|
sorry, guess it converted it to actual html. not sure how to turn that off so you can see.
|
Top
|
|
|
|
#189489 - 2008-09-05 10:15 PM
Re: KIX GUI logon script
[Re: Ethanous]
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4545
Loc: USA
|
Man, this posts really screws with Firefox. I don't even get a scroll bar without using IE.
{edit: Added code tags and FF works, but now long lines }
Edited by Allen (2008-09-05 11:02 PM)
|
Top
|
|
|
|
#189492 - 2008-09-05 10:48 PM
Re: KIX GUI logon script
[Re: Allen]
|
Ethanous
Fresh Scripter
Registered: 2008-09-04
Posts: 8
|
sorry, didn't expect it to actually create the html docuemnt. i thought it would just put the html code in.
|
Top
|
|
|
|
#189511 - 2008-09-07 04:04 AM
Re: KIX GUI logon script
[Re: Gargoyle]
|
Ethanous
Fresh Scripter
Registered: 2008-09-04
Posts: 8
|
thank you allen for making this easier to read.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 466 anonymous users online.
|
|
|