Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Array of Checkbox

$
0
0

Hi all,

Please excuse me for this question, but I'm not a programmer.

I'm trying to build an HTA for users choose the printer of preference and map.

But I would like to create an array if possible with a variable (so I can put more printers easily later) and have an option for make Default.

What I have is this:

<html><head><title>Cobalt Map Printers</title><HTA:APPLICATION
  APPLICATIONNAME="Cobalt Map Printers"
  ID="CobaltMapPrinters"
  VERSION="1.0"
  BORDER="dialog"
  INNERBORDER="no"
  MAXIMIZEBUTTON="no"
  SCROLL="no"
  SINGLEINSTANCE="yes"/></head><script language="VBScript">

Sub Window_OnLoad
  	Dim width,height
  	width=800
  	height=600
  	self.ResizeTo width,height
  	self.MoveTo (screen.AvailWidth-width)/2,(screen.AvailHeight-height)/2
End Sub

Set WshNetwork = CreateObject("WScript.Network")

Sub OnClickButtonOK()

	  If CIEAAA21701.checked Then WshNetwork.AddWindowsPrinterConnection "\\printerserver\printer01"
	  End If
End Sub
Sub OnClickButtonCancel()
	window.Close
End Sub</script><body bgcolor="buttonface"><table border=0 width=100% height=100%><tr><td height=100% width=100% valign=top align=left><!--Add your controls here--><input type="checkbox" name="printer01" id="printer01">Printer printer01<br /></td></tr><tr><td align=right><input type="button" style="width: 80px" name="OK" id="OK" value="OK" onclick="OnClickButtonOK">&nbsp;&nbsp;<input type="button" style="width: 80px" name="Cancel" id="Cancel" value="Cancel" onclick="OnClickButtonCancel"></td></tr></table></table></body></html>

Thanks in advance


Cláudio Gonçalves


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>