Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Checkbox

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,3132
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Checkbox
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Checkbox - 5/26/2005 8:31:59 AM   
  tjpogue

 

Posts: 2
Score: 0
Joined: 5/26/2005
From: USA
Status: offline
I'm looking for an example of a checkbox script to insert into an HTA file. I have a list of items to be checked and I want users to be able to select the items from the list. I have that part but what I'm having trouble with is I need to find someway to record what has been selected. If anyone can help out I would be gratefull. This is the first time that I've worked with VBScript so go easy on me!

Thanks
Trevor Pogue

PS: Here is an example of what I have so far.

<html>
<head>
<title>Avanade Image for Microsoft XP SP2</title>
<HTA:APPLICATION
APPLICATIONNAME="HTA Test"
SCROLL="yes"
SINGLEINSTANCE="yes"
WINDOWSTATE="normal"
>

</head>

<script language="VBScript">
dim BasicCheckbox
Sub RunScript
If BasicCheckbox.Checked Then
Msgbox "The checkbox has been checked."
Else
Msgbox "The checkbox has not been checked."
End If
End Sub
</script>
<body>
<form name="Software Checklist" method="POST">
<div align="left"><br>
<p>Please Choose Additional Software to Complete Installation!</p>
<input type="Checkbox"name="BasicCheckbox"value="Virtual PC 2004"> Virtual PC 2004<br>
<input type="checkbox" name="option2" value="Exchange 2003 Resource Kit"> Exchange 2003 Resource Kit<br>
<input type="checkbox" name="option3" value="Windows 2003 Admin pack"> Windows 2003 Admin pack<br>
<input type="checkbox" name="option4" value="Network and System Diagnostic tools"> Network and System Diagnostic tools<br>
<input type="checkbox" name="option5" value="AD Diagnostic Tools"> AD Diagnostic Tools<br>
<input type="checkbox" name="option6" value="Regmon"> Regmon<br>
<input type="checkbox" name="option7" value="Filemon"> Filemon<br>
<input type="checkbox" name="option8" value="Portmon"> Portmon<br>
<input type="checkbox" name="option9" value="Virtual PC 2004"> Virtual PC 2004<br>
<input type="checkbox" name="option10" value="SQL 2K Dev Ed + SP3a"> SQL 2K Dev Ed + SP3a<br>
<input type="checkbox" name="option11" value="Visual Studio 2003 Enterprise Architect"> Visual Studio 2003 Enterprise Architect<br>
<input type="checkbox" name="option12" value="IIS"> IIS<br>
<input type="checkbox" name="option13" value="Visual SourceSafe"> Visual SourceSafe<br>
<input type="checkbox" name="option14" value="VSVars32.bat"> VSVars32.bat<br>
<input type="checkbox" name="option15" value="Witway" checked> Witway 4.0 <FONT COLOR="red">(Required for Payroll!!)</FONT><br>
<br>
</div>
<p>Click here when finished.</p>
<input id=runbutton class="button" type="button" value="OK" onClick="RunScript">
</form>
</body>

</html>
 
 
Post #: 1
 
 Re: Checkbox - 5/26/2005 6:45:34 PM   
  Zifter


Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
You're on the right track.
The problem lies in pointing to the control.
You'll have to use syntax like "document.all.BasicCheckBox.Checked" or in case you are using forms (and you are) you also could use "document.SoftwareChecklist.BasicCheckBox.Checked" note:You'll have to remove the space between "Software" and "Checklist"

HTH

(in reply to tjpogue)
 
 
Post #: 2
 
 Re: Checkbox - 5/27/2005 5:52:34 AM   
  tjpogue

 

Posts: 2
Score: 0
Joined: 5/26/2005
From: USA
Status: offline
Thanks for the input I will give it a try! Do you know about any good online or book references that I could read up on?

(in reply to tjpogue)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Checkbox Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts