Having trouble w/ syntax on retrieving data from menu list.
Created an .hta form, but getting syntax error on line 41.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Altiris Server Replacement</title>
<style type="text/css">
<!--
.style1 {
font-size: x-large;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style2 {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.style3 {font-size: 10px}
-->
</style>
</head>
<SCRIPT LANGUAGE="VBScript">
Sub Window_onLoad
window.resizeTo 800,800
End Sub
</SCRIPT>
<Script language="vbscript">
Sub SendEmail
Set MyApp = CreateObject("Outlook.Application")
Set MyItem = MyApp.CreateItem(0) 'olMailItem
With MyItem
.To = "myemail.com"
.CC = SendTo2.value
.BCC = SendTo3.value
.Subject = "New Laptop and/or Peripheral Request"
.ReadReceiptRequested = False
.Body = "Type of request: " & type.Value & vbcrlf & "If laptop request, what series: " & series.Value & vbcrlf & "Reason for request: " & reason.Value & vbcrlf & "What peripherals are needed: " & peripheral.Value & vbcrlf & "Employee type: " & emptype.value & vbcrlf & "Name: " & name.value & vbcrlf & "Email: " & email.value & vbcrlf & "DSID: " & dsid.value & vbcrlf & "Computer name: for perhiperal request" & computer.value & vbcrlf & "Other information: " & otherinfo.value
.Display
.Send
End With
MsgBox "Message sent!"
Window.Close
End Sub
</Script>
<body>
<table width="593" border="0">
<tr>
<td colspan="2"><span class="style1">Hardware Request </span></td>
</tr>
<tr>
<td width="83">To:</td>
<td width="338"><label>
<textarea name="SendTo" cols="50" rows="5" id="SendTo">
</textarea>
</label></td>
</tr>
<tr>
<td>CC:</td>
<td><input name="SendTo2" type="text" id="SendTo2" value="" size="50" /></td>
</tr>
<tr>
<td>BCC:</td>
<td><input name="SendTo3" type="text" id="SendTo3" value="" size="50" /></td>
</tr>
<tr>
<td>Subject:</td>
<td><span class="style2">New Laptop/Peripheral Request </span></td>
</tr>
<tr>
<td>Type of Request: </td>
<td><select name="type" id="type">
<option value="Laptop Request">Laptop</option>
<option value="Peripheral Request">Peripheral</option>
</select></td>
</tr>
<tr>
<td height="26">If laptop request which series: </td>
<td><select name="series" id="series">
<option value="D-Series 630">D - Series</option>
<option value="E-Series 6400">E - Series</option>
</select></td>
</tr>
<tr>
<td height="26">Reason for Request: </td>
<td><select name="reason" id="reason">
<option value="New Employee">New Employee</option>
<option value="Transfer from other BU">Transfer</option>
<option value="Exst Emp Upgrade">Upgrade</option>
<option value="Exs Emp Dsktp to Laptp">Desktop to Laptop</option>
</select></td>
</tr>
<tr>
<td height="26"><p>If peripheral request, what is needed:<br />
<span class="style3">(hold ctrl for multiple selections)
</span> </p>
</td>
<td><select name="peripheral" size="5" multiple="multiple" id="peripheral">
<option value="E - Docking Station">E - Series</option>
<option value="D - Docking Station">D - Series</option>
<option value="LCD Display">LCD Display</option>
<option value="Mouse">Mouse</option>
<option value="Keyboard">Keyboard</option>
</select></td>
</tr>
<tr>
<td height="26">Contractor or Employee: </td>
<td><select name="emptype" id="emptype">
<option value="Contractor">Contractor</option>
<option value="Employee">Employee</option>
</select></td>
</tr>
<tr>
<td height="26">Name:</td>
<td><input name="name" type="text" id="name" size="40" /></td>
</tr>
<tr>
<td height="26">Email:</td>
<td><input name="email" type="text" id="email" size="40" /></td>
</tr>
<tr>
<td height="26">DSID:</td>
<td><input name="dsid" type="text" id="dsid" size="15" /></td>
</tr>
<tr>
<td height="26">Computer Name: (for peripheral order) </td>
<td><input name="computer" type="text" id="computer" size="11" maxlength="11" /></td>
</tr>
<tr>
<td height="26">Other Information: </td>
<td><textarea name="otherinfo" cols="40" rows="5" id="otherinfo"></textarea></td>
</tr>
<tr>
<td height="26"><label>
<input type="submit" name="Submit" value="Send Email" onClick="SendEmail"/>
</label></td>
<td> </td>
</tr>
</table>
</body>
</html>
Created an .hta form, but getting syntax error on line 41.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Altiris Server Replacement</title>
<style type="text/css">
<!--
.style1 {
font-size: x-large;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style2 {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.style3 {font-size: 10px}
-->
</style>
</head>
<SCRIPT LANGUAGE="VBScript">
Sub Window_onLoad
window.resizeTo 800,800
End Sub
</SCRIPT>
<Script language="vbscript">
Sub SendEmail
Set MyApp = CreateObject("Outlook.Application")
Set MyItem = MyApp.CreateItem(0) 'olMailItem
With MyItem
.To = "myemail.com"
.CC = SendTo2.value
.BCC = SendTo3.value
.Subject = "New Laptop and/or Peripheral Request"
.ReadReceiptRequested = False
.Body = "Type of request: " & type.Value & vbcrlf & "If laptop request, what series: " & series.Value & vbcrlf & "Reason for request: " & reason.Value & vbcrlf & "What peripherals are needed: " & peripheral.Value & vbcrlf & "Employee type: " & emptype.value & vbcrlf & "Name: " & name.value & vbcrlf & "Email: " & email.value & vbcrlf & "DSID: " & dsid.value & vbcrlf & "Computer name: for perhiperal request" & computer.value & vbcrlf & "Other information: " & otherinfo.value
.Display
.Send
End With
MsgBox "Message sent!"
Window.Close
End Sub
</Script>
<body>
<table width="593" border="0">
<tr>
<td colspan="2"><span class="style1">Hardware Request </span></td>
</tr>
<tr>
<td width="83">To:</td>
<td width="338"><label>
<textarea name="SendTo" cols="50" rows="5" id="SendTo">
</textarea>
</label></td>
</tr>
<tr>
<td>CC:</td>
<td><input name="SendTo2" type="text" id="SendTo2" value="" size="50" /></td>
</tr>
<tr>
<td>BCC:</td>
<td><input name="SendTo3" type="text" id="SendTo3" value="" size="50" /></td>
</tr>
<tr>
<td>Subject:</td>
<td><span class="style2">New Laptop/Peripheral Request </span></td>
</tr>
<tr>
<td>Type of Request: </td>
<td><select name="type" id="type">
<option value="Laptop Request">Laptop</option>
<option value="Peripheral Request">Peripheral</option>
</select></td>
</tr>
<tr>
<td height="26">If laptop request which series: </td>
<td><select name="series" id="series">
<option value="D-Series 630">D - Series</option>
<option value="E-Series 6400">E - Series</option>
</select></td>
</tr>
<tr>
<td height="26">Reason for Request: </td>
<td><select name="reason" id="reason">
<option value="New Employee">New Employee</option>
<option value="Transfer from other BU">Transfer</option>
<option value="Exst Emp Upgrade">Upgrade</option>
<option value="Exs Emp Dsktp to Laptp">Desktop to Laptop</option>
</select></td>
</tr>
<tr>
<td height="26"><p>If peripheral request, what is needed:<br />
<span class="style3">(hold ctrl for multiple selections)
</span> </p>
</td>
<td><select name="peripheral" size="5" multiple="multiple" id="peripheral">
<option value="E - Docking Station">E - Series</option>
<option value="D - Docking Station">D - Series</option>
<option value="LCD Display">LCD Display</option>
<option value="Mouse">Mouse</option>
<option value="Keyboard">Keyboard</option>
</select></td>
</tr>
<tr>
<td height="26">Contractor or Employee: </td>
<td><select name="emptype" id="emptype">
<option value="Contractor">Contractor</option>
<option value="Employee">Employee</option>
</select></td>
</tr>
<tr>
<td height="26">Name:</td>
<td><input name="name" type="text" id="name" size="40" /></td>
</tr>
<tr>
<td height="26">Email:</td>
<td><input name="email" type="text" id="email" size="40" /></td>
</tr>
<tr>
<td height="26">DSID:</td>
<td><input name="dsid" type="text" id="dsid" size="15" /></td>
</tr>
<tr>
<td height="26">Computer Name: (for peripheral order) </td>
<td><input name="computer" type="text" id="computer" size="11" maxlength="11" /></td>
</tr>
<tr>
<td height="26">Other Information: </td>
<td><textarea name="otherinfo" cols="40" rows="5" id="otherinfo"></textarea></td>
</tr>
<tr>
<td height="26"><label>
<input type="submit" name="Submit" value="Send Email" onClick="SendEmail"/>
</label></td>
<td> </td>
</tr>
</table>
</body>
</html>