|
san
Date:: Jan 05, 2009
Time:: 10:43
|
<%@ LANGUAGE="VBScript" %>
<%
Option Explicit
'Buffer the response, so Response.Expires can be used
Response.Buffer = TRUE
%>
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t...
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include virtual="helpdesk/Test/settings.asp" -->
<!--#include virtual="helpdesk/Test/Email_core.asp" -->
<!--#include virtual="/helpdesk/Test/connection.asp" -->
<head>
<title>HelpDesk NewProblem</title>
<script type="text/javascript">
var strAlertMsg = ""
var focusField = ""
//Validate Text Box
function isEmpty(theForm,strFieldName,strMsg){
var objFormField = theForm.elements[strFieldName];
var strValue = objFormField.value;
strValue = strValue.split(" ").join("")
if(strValue.length<1){
strAlertMsg += "- "+ strMsg +" is Required.\n";
if(!focusField) focusField =""+ strFieldName +"";
return false;
}
return true;
}
//==========================================================================
//Validate the Select
function hasSelection(theForm,strFieldName,strMsg) {
var objFormField = theForm.elements[strFieldName];
if(objFormField.selectedIndex ==0) {
strAlertMsg += "- "+ strMsg +" is Required.\n";
if(!focusField) focusField =""+ strFieldName +"";
return false;
}
return true;
}
//========================================================================
//Begin Page Validation
function validateForm(theForm){
strAlertMsg = ""
focusField = ""
hasSelection(theForm,'select1','departmentname')
isEmpty(theForm,'txtBox','NH')
isEmpty(theForm,'txtBox1','SSN')
isEmpty(theForm,'txtBox5','problemTitle')
isEmpty(theForm,'txtBox6','problemDescription')
if(strAlertMsg !=""){
alert("Please correct the following errors:\n____________________________\n\n" + strAlertMsg);
eval("theForm." + focusField + ".focus()");
return false;
}
return true;
}
</script>
<script type="text/javascript">
function enableDefault() {
document.getElementById('representativeSSN').disabled = false;
document.getElementById('organizationName').disabled = false;
document.getElementById('representativeZipCode').disabled = false;
document.getElementById('txtCustomMessage').disabled = true;
}
function enableCustom() {
document.getElementById('representativeSSN').disabled = true;
document.getElementById('organizationName').disabled = true;
document.getElementById('representativeZipCode').disabled = true;
document.getElementById('txtCustomMessage').disabled = false;
}
/**/
//========================================================================
</script>
<script type="text/javascript">
#imageUpload input {
display: block;
}
//this script to upload files
function fileFields() {
var x = document.getElementById('imageUpload');
x.onclick = function() {
var i = parseFloat(this.lastChild.id)+1;
input = document.createElement("input");
input.setAttribute("type", "file");
input.setAttribute("name", 'imageName_' + i);
input.setAttribute("id", i);
this.appendChild(input);
}
}
</script>
</head>
<body>
<!-- <form action="../user/postnew.asp" method="POST">-->
<form id="ContactFormforSOST" action="Confirmation1.asp" method="post" onsubmit="return validateForm(this);">
<div align="center">
<table class="Wide">
<tr>
<td colspan="2"><div align="right"> <b><em>*</em> - Required</b> </div>
</td>
</tr>
<tr class="Head1">
<td colspan="2" align="center"><b>Contact Form for SOST</b></td>
</tr>
<tr Class="Body1">
<td width="257" valign="top"><div align="center">
<table class="narrow" border="0">
<tr>
<td height="32" colspan="2" align="center"><b>Tell us how to get in touch with you</b> </td>
</tr>
<tr>
<td height="47"><b>UserName:</b> </td>
<td><input type="text" name="UserName" size="20" value="<% = UserName %>" ><em>*</em></td>
</tr>
<tr>
<td height="35"><b>EMail:</b> </td>
<td><input type="text" name="Email" size="20" value="<% = Email %>" ><em>*</em></td>
</tr>
<tr>
<td height="38"><b>Location:</b> </td>
<td><input type="text" name="Location" size="20" value="<% = Location %>"><em>*</em>
</td>
</tr>
<tr>
<td height="40"><b>Phone:</b> </td>
<td><input type="text" name="Phone" size="20" value="<% = Phone %>"><em>*</em>
</td>
</tr>
</table>
</div>
</td>
<td width="411" valign="top"><div align="center">
<table width="411" height="207" border="0" class="narrow">
<tr>
<td height="27" colspan="2"><div align="center"> <b>Information</b> </div>
</td>
</tr>
<tr>
<td width="134" height="43"><b>
<label id="lbldept" for="select1">Department:</label>
</b> </td>
<td width="267">
<%
Dim strSQL, rsLoop
'query for table
strSQL = "SELECT * From Departments WHERE DepartmentID > 0 ORDER BY DepartmentName ASC"
'set recordset object
set rsLoop = objConn.Execute(strSQL)
%>
<SELECT id="select1" NAME="DepartmentName">
<OPTION value="0" selected="selected" >Select Department</OPTION>
<%
While not rsLoop.eof
%>
<option value="<% = rsLoop("DepartmentID")%>">
<% = rsLoop("DepartmentName") %></OPTION>
<%
rsLoop.MoveNext
WEnd
%>
</select>
<em>*</em></td>
</tr>
<tr>
<td height="36"><b>
<label id="lblnh" for="txtBox">NH</label>
</b></td>
<td><input type="text" id="txtBox" name="NH" />
<em>*</em> </td>
</tr>
<tr>
<td height="44"><b>
<label id="lblssn" for="txtBox1">SSN:</label>
</b> </td>
<td><input type="text" id="txtBox1" name="SSN" />
<em>*</em> </td>
</tr>
</table>
</div>
</td>
</tr>
<tr class="Head2">
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><div align="left"> <b>IsRepresentativePayeeInvolved?</b> <em>*</em> </div>
</td>
</tr>
<tr>
<td><b>Yes:</b>
<input type="radio" name="IsRepresentativeInvolved" value="01" onclick="enableDefault()">
<b>No:</b>
<input type="radio" name="IsRepresentativeInvolved" value="02" checked="checked" onclick="enableCustom()">
</td>
</tr>
<tr class="Body1">
<tr>
<td><b>Reppayeessn:</b> </td>
<td><input name="RepresentativeSSN" disabled size="10" value="Enter SSN" type="text" onfocus="if(this.value=='Enter SSN'){this.value='';}" onblur="if(this.value==''){this.value='Enter SSN';}">
<em>*</em> </td>
</tr>
<tr>
<td><b>ZipCode:</b> </td>
<td><input name="RepresentativeZipCode" disabled size="20" value="Enter ZipCode" type="text" onfocus="if(this.value=='Enter ZipCode'){this.value='';}" onblur="if(this.value==''){this.value='Enter ZipCode';}">
<em>*</em> </td>
</tr>
<tr>
<td><b>orgainizationname:</b> </td>
<td><input name="OrganizationName" disabled size="50" value="Enter Organization Name" type="text" onfocus="if(this.value=='Enter Organization Name'){this.value='';}" onblur="if(this.value==''){this.value='Enter Organization Name';}">
<em>*</em><br />
</td>
</tr>
</tr>
<tr class="Body1">
<tr>
<td colspan="2"><div align="left"> <b>
<label id="lblRadio" for="isProblemQuestion">What kind of issue do you have?:</label>
</b> <em>*</em></div></td>
</tr>
<tr>
<td><input type="radio" id="radio1" name="IsProblemQuestion" checked="checked" value="01" />
<b>Problem/Question</b> </td>
<td><input type="radio" name="IsComment" value="02" />
<b>Comment</b> </td>
</tr>
<td colspan="2"><b>
<label id="lbltitle" for="txtBox5">Subject</label>
</b> <em>*</em><br>
<input type="text" size="50" id="txtBox5" name="ProblemTitle" />
<p> <b>
<label id="lblDesc" for="txtBox6">Enter your question or issue below: :</label>
</b> <em>*</em><br />
<textarea cols="80" rows="12" id="txtBox6" name="ProblemDescription"></textarea>
</td>
</tr>
<tr class="Head2">
<td colspan="2"><div align="center">
<input type="submit" id="btnSubmit" name="btnSubmit" value="SubmitTicket">
<input type="reset" id="btnReset" name="btnReset" value="ClearForm">
</div>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
|