Do you mean you want Perl to create the HTA text file or replace the VBScript with Perl? Since the HTA is just a text file it can create one on if you want, but it cannot be used within the HTA itself. The browser cannot interpret Perl.
................................ Kind regards Glenn Deans Architect Siemens IT Solutions and Services Urbana, OH USA -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Octavian Rasnita Sent: Friday, January 30, 2009 1:24 PM To: [email protected] Subject: hta Hello, Can perlscript be used to create .hta applications like the example below which uses VBScript? I have tried to make some replacements like: txtFruit.Focus -> $txtFruit->Focus(); but it gives an error telling that $txtFruit is not defined and a few other errors. Thank you. <HTML> <BODY> <HEAD> <title>Fruit Basket HTA demo</title> <HTA:APPLICATION ID="FruitBasket" APPLICATIONNAME="FruitBasket" BORDER="thick" CAPTION="yes" ICON="test.ico" SHOWINTASKBAR="yes" SINGLEINSTANCE="yes" WINDOWSTATE="normal" SYSMENU="yes" CONTEXTMENU="no" windowState="maximize" MAXIMIZEBUTTON="no" MINIMIZEBUTTON="yes"> <Script Language=JScript> window.resizeTo(250,150); window.caption="Fruit Basket HTA demo"; </SCRIPT> <Script Language=VBS> Sub Window_OnLoad txtFruit.Focus End Sub Sub addFruit If not txtFruit.value="" then Set fruitOption = Document.createElement("OPTION") fruitOption.Text =txtFruit.value fruitOption.Value =txtFruit.value lstFruit.Add(fruitOption) txtFruit.value="" End If txtFruit.Focus End Sub Sub removeFruit For Each fruitOption in lstFruit.Options If fruitOption.Value =lstFruit.value Then fruitOption.RemoveNode Exit Sub End If Next txtFruit.focus End Sub </SCRIPT> </HEAD> <body scroll="no"> <label for="txtFruit">Enter Fruit:</label> <input type="text" name="txtFruit" id="txtFruit" size=40 value="" style="width:150" > <select size="0" name="lstFruit" style="width:150"> </select> <INPUT TYPE="Submit" ID="btnAdd" VALUE="Add Fruit" accesskey="a" onclick=addFruit()> <INPUT TYPE="Submit" ID="Remove fruit" VALUE="Remove fruit" accesskey="r" onclick=removeFruit()> </BODY> </HTML> Octavian _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
