http://dieseyer.de • all rights reserved • © 2011 v11.4

</html>
<head>

<!--
'v5.B*****************************************************
' File: input.hta
' Autor: dieseyer@gmx.de
' http://dieseyer.de
'
' ermöglicht die Eingabe von drei Parametern . . .
'
'*********************************************************

zu HTA ==> http://msdn.microsoft.com//workshop/author/hta/hta_node_entry.asp
zu HTML ==> http://selfhtml.org/ bzw. Download
==> http://aktuell.de.selfhtml.org/extras/download.shtml#adressen

SHOWINTASKBAR="no"
WINDOWSTATE="maximize"
-->
<HTA:APPLICATION ID="oHTA"

BORDER="none" <!-- -->
INNERBORDER="no" <!-- -->
SCROLL="No" <!-- -->
NAVIGABLE="yes" <!-- -->
APPLICATIONNAME="Service.CD Anmeldung"
>

<!-- <title># input.hta #</title> wird in der Taskleiste angezeigt -->
<title># input.hta #</title>

<style type="text/css">

TD {font-size:12Pt; color:#E0C000; font-style:bold; font-family:Arial, Verdana}
input {font-size:12pt; color:#202060; font-style:bold; font-family:Verdana}
H2 {font-size:18pt; color:#E0C000; font-style:bold; font-family:Verdana}
</style>

</head>

<script language="VBscript">

Const Titel = "input.hta" ' für MsgBox / PopUp
Dim WshShell : Set WSHShell = CreateObject("Wscript.Shell")
Dim WSHnet : Set WSHnet = CreateObject("WScript.NetWork")
Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")

'****************************************
sub Install()
'****************************************
Dim AnzTage
AnzTage = Document.All.xTage.Value
AnzTage = CInt( AnzTage )
If AnzTage = 0 Then MsgBox "Ein Jahr hat """ & AnzTage & """ Tage?" & vbCRLF & vbCRLF & "Es geht doch wohl etwas genauer, oder?!", , "0055 :: " & Titel : Exit Sub
If AnzTage = 333 Then MsgBox "Wieviel Tage hat ein Jahr?! """ & AnzTage & """ Tage?" & vbCRLF & vbCRLF & "Bitte ETWAS Mühe geben!" , , "0056 :: " & Titel : Exit Sub
If AnzTage < 365 Then MsgBox "Könnte ein Jahr ein paar Tage mehr als """ & AnzTage & """ Tage haben?" & vbCRLF & vbCRLF & "Es geht doch wohl etwas genauer, oder?!", , "0057 :: " & Titel : Exit Sub
If AnzTage > 366 Then MsgBox "Könnte ein Jahr ein paar Tage weniger als """ & AnzTage & """ Tage haben?" & vbCRLF & vbCRLF & "Es geht doch wohl etwas genauer, oder?!", , "0058 :: " & Titel : Exit Sub
If AnzTage = 366 Then MsgBox "Sogar ans Schaltjahr gedacht - alle Achtung!" , , "0059 :: " & Titel ' kein : Exit Sub

Dim UName
UName = Document.All.xName.Value
If UName = "" Then MsgBox "Sieh doch mal im Ausweis nach . . . und trage dann bitte deinen RICHTIGEN Namen ein!", , "0063 :: " & Titel : Exit Sub

Dim WochenEnde
If Document.All.opt1.checked Then WochenEnde = "WE"
If Document.All.opt2.checked Then WochenEnde = "keinWE"
If WochenEnde = "" Then MsgBox "Ist nun heute Wochenenede oder nich?!", , "0068 :: " & Titel : Exit Sub

Dim Txt
Txt = " " & "Das waren die Eingaben:"
Txt = Txt & vbCRLF & AnzTage & vbTab & " Tage soll ein Jahr haben."
Txt = Txt & vbCRLF & UName & vbTab & " wurde als Name eingegeben."
Txt = Txt & vbCRLF & WochenEnde & vbTab & " soll heute sein."
MsgBox Txt, , "0075 :: " & Titel

self.close

End Sub ' Install()



'**************************************************************
Sub Schliessen()
'**************************************************************

MsgBox "Dann eben nicht!", , Titel

self.close

End Sub ' Schliessen()



'**************************************************************
Sub document_onKeyDown
'**************************************************************
If window.event.keyCode = 13 Then Call Install()
End Sub



'**************************************************************
Function BeimLaden() ' ruft einige Routinen auf
'**************************************************************
Txt = ""
Txt = Txt & "<fieldset><Legend >  Bitte Name eineben: </legend>"
Txt = Txt & "<BR>"
Txt = Txt & "  <input Type=""Text"" Name=""xName"" VALUE=""" & WSHnet.UserName & """ > "
Txt = Txt & "<BR><BR>"
Txt = Txt & "</fieldset>"
document.all.NetUserAnzeige.innerHTML = Txt

Txt = ""
Txt = Txt & "<fieldset><Legend align=""Center"">  Ist heute Wochenende? </legend>"
<!-- Txt = Txt & "<fieldset><Legend >  Ist heute Wochenende? </legend>" -->
Txt = Txt & "  <input type=""radio"" name=""R1"" ID=""opt1"" value=""ja"">  Ja - heute ist Wochenende!<br>"
Txt = Txt & "  <input type=""radio"" name=""R2"" ID=""opt2"" value=""nein"">  Nein - ich muss arbeiten!<br>"
<!-- Txt = Txt & "  <input checked type=""radio"" name=""R2"" ID=""opt2"" value=""nein"">  Nein - ich muss arbeiten!<br>" -->
Txt = Txt & "<BR>"
Txt = Txt & "</fieldset>"

document.all.WeekEnd.innerHTML = Txt

End Function ' BeimLaden()


</script>

<body onLoad="BeimLaden()" bgcolor="#202060" >

<form>
<BR><BR>

<h2 align="center">. . . bitte ausfüllen . . .

<table border="0" cellspacing="10px" width="100%">

<tr>

<td bgcolor=#1d2160 >
<!-- <td bgcolor=#1d2160 align="center" cellspacing="70%" > -->

<fieldset><Legend align="Center"></legend>
  Wieviel Tage hat ein Jahr?
<BR><BR>
  <input Type="Text" Name="xTage" Value="333" >
<BR><BR>
</fieldset>

<div id=NetUserAnzeige> </div>

<div id=WeekEnd> </div>

<BR>
   
<INPUT TYPE="Button" Name="StartVBS" value="Start" onClick="Install()" >
   
<INPUT TYPE="Button" Name="EndeHTA" value="Beenden" onClick="Schliessen()" >
<BR><BR>

</td>

</tr>

</table>

</form>

</body>

</html>

http://dieseyer.de • all rights reserved • © 2011 v11.4