C
carmen
When I submit my form I am not picking up the Severity field. I am sending
the form results to another page where I am updating a db. If I do a
response writre for the form field I get nothing. Everything else I am able
to pick up, just not the severity field.
Partial code is below.
Any suggestions would be welcomed
Thanks
Carmen
<!--
var shifts;
function init(){
//to initialize them all to the same times
shifts={dayOfWeek: [{day: "Question",theShifts:
[""]},{day:"Other",theShifts: [""]},{day:"Problem",theShifts:
["S1","S2"]},{day:"",theShifts: [""]}]};
}
//change day function
function changeDay(elem)
{
var j, day;
var shiftText;
if(elem.selectedIndex == 0) //if they selected our pretty
[select a day] stmt
return false; //do nothing and leave quietly
//Clear the second drop down of all but top [select a shift]
for (i = FrontPage_Form1.Severity.options.length - 1; i >= 1; i--)
FrontPage_Form1.Severity.options = null;
FrontPage_Form1.Severity.selectedIndex = 0;
//grab day from select box
day = elem.selectedIndex-0;
for(j=0;j<shifts.dayOfWeek[day].theShifts.length;j++)
{
document.FrontPage_Form1.Severity.options[j] = new
Option(shifts.dayOfWeek[day].theShifts[j],"");
}
}
//-->
</SCRIPT>
<body onLoad="init();">
<%
Set dbConnection = Server.CreateObject("ADODB.Connection")
dbConnection.Open "support"
%>
<%
SQLStatement = "Select * From calls Where callID =" &
Request.querystring("callID")
'response.write SQLStatement
Set RSupdate = dbConnection.Execute(SQLStatement)
%>
<body bgcolor="#ADB5C2" link="#ADB5C2" vlink="#ADB5C2" alink="#ADB5C2">
<form method="POST" action="submitupdate.asp" onsubmit="return
FrontPage_Form1_Validator(this)" language="JavaScript"
name="FrontPage_Form1">
<p align="center">
<b><font size="6">DMAPS Support Call Update </font></b></p>
<p align="center">
<font size="4" ><font color="#FF0000">*</font> Denotes a Required
Field</font> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#111111" width="94%" id="AutoNumber1" height="81">
<tr>
<td width="35%" height="19" colspan="2"><b>Call ID
<input type="text" Readonly name="callID" size="20"
value="<%=RSupdate("callID")%>"></b></td>
<td width="31%" height="19"><b>Logged by:
<%=RSupdate("RecvBy")%></b></td>
<td width="34%" height="19"><b>Open Date:
<%=FormatDateTime(RSupdate("Opendate"),2)%></b></td>
<td width="34%" height="19"><b></b></td>
</tr>
<tr>
<td width="35%" height="19" colspan="2"><b>Customer Name</b></td>
<td width="31%" height="19"><b>Contact Method </b> </td>
<td width="34%" height="19"> <b>Call Type</b></td>
<td width="34%" height="19">Severity</td>
</tr>
<tr>
<td width="35%" height="22" colspan="2"><b>
<input type="text" name="Custname" size="20"
value="<%=RSupdate("Custname")%>"></b></td>
<td width="31%" height="22"><b>
<select size="1" name="ContactMeth">
<option selected><%=RSupdate("ContactMeth")%></option>
<%
If RSupdate("ContactMeth")= "Email" then
%>
<option>Helpdesk</option>
<option>Other</option>
<option>Phone</option>
<% end if %>
<%
if RSupdate("ContactMeth")= "Helpdesk" Then
%>
<option>Email</option>
<option>Other</option>
<option>Phone</option>
<% end if %>
<%
if RSupdate("ContactMeth")= "Other" Then
%>
<option>Email</option>
<option>Helpdesk</option>
<option>Phone</option>
<% end if %>
<%
If RSupdate("ContactMeth")= "Phone" then
%>
<option>Email</option>
<option>Helpdesk</option>
<option>Other</option>
<%
End if
%>
</select> </b></td>
<td width="34%" height="22"><b>
<select size="1" name="CallTyp" onchange="changeDay(this);">
<%
If RSupdate("CallTyp")= "Question" then
%>
<option selected>Question</option>
<option>Other</option>
<option>Problem</option>
<option></option>
<% end if %>
<%
if RSupdate("CallTyp")= "Other" Then
%>
<option>Question</option>
<option selected>Other</option>
<option>Problem</option>
<option></option>
<% end if %>
<%
if RSupdate("CallTyp")= "" Then
%>
<option>Question</option>
<option>Other</option>
<option>Problem</option>
<option selected></option>
<%
End if
%>
<%
if RSupdate("CallTyp")= "Problem" Then
%>
<option>Question</option>
<option>Other</option>
<option selected>Problem</option>
<option></option>
<%
End if
%>
</select></b></td>
<td width="34%" height="22"><b>
<%
if RSupdate("Severity1")="S1" then
sever1 ="S1"
End if
if RSupdate("Severity2")="S2" then
sever1 ="S2"
End if
%>
<select size="1" name="Severity">
<% if sever1= "S1" then %>
<option selected>S1</option>
<option>S2</option>
<%
End if %>
<% if sever1= "S2" then %>
<option>S1</option>
<option selected>S2</option>
<% end if %>
<% if sever1= "" then %>
<option> </option>
<% end if %>
</select></b>
</td>
the form results to another page where I am updating a db. If I do a
response writre for the form field I get nothing. Everything else I am able
to pick up, just not the severity field.
Partial code is below.
Any suggestions would be welcomed
Thanks
Carmen
<!--
var shifts;
function init(){
//to initialize them all to the same times
shifts={dayOfWeek: [{day: "Question",theShifts:
[""]},{day:"Other",theShifts: [""]},{day:"Problem",theShifts:
["S1","S2"]},{day:"",theShifts: [""]}]};
}
//change day function
function changeDay(elem)
{
var j, day;
var shiftText;
if(elem.selectedIndex == 0) //if they selected our pretty
[select a day] stmt
return false; //do nothing and leave quietly
//Clear the second drop down of all but top [select a shift]
for (i = FrontPage_Form1.Severity.options.length - 1; i >= 1; i--)
FrontPage_Form1.Severity.options = null;
FrontPage_Form1.Severity.selectedIndex = 0;
//grab day from select box
day = elem.selectedIndex-0;
for(j=0;j<shifts.dayOfWeek[day].theShifts.length;j++)
{
document.FrontPage_Form1.Severity.options[j] = new
Option(shifts.dayOfWeek[day].theShifts[j],"");
}
}
//-->
</SCRIPT>
<body onLoad="init();">
<%
Set dbConnection = Server.CreateObject("ADODB.Connection")
dbConnection.Open "support"
%>
<%
SQLStatement = "Select * From calls Where callID =" &
Request.querystring("callID")
'response.write SQLStatement
Set RSupdate = dbConnection.Execute(SQLStatement)
%>
<body bgcolor="#ADB5C2" link="#ADB5C2" vlink="#ADB5C2" alink="#ADB5C2">
<form method="POST" action="submitupdate.asp" onsubmit="return
FrontPage_Form1_Validator(this)" language="JavaScript"
name="FrontPage_Form1">
<p align="center">
<b><font size="6">DMAPS Support Call Update </font></b></p>
<p align="center">
<font size="4" ><font color="#FF0000">*</font> Denotes a Required
Field</font> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#111111" width="94%" id="AutoNumber1" height="81">
<tr>
<td width="35%" height="19" colspan="2"><b>Call ID
<input type="text" Readonly name="callID" size="20"
value="<%=RSupdate("callID")%>"></b></td>
<td width="31%" height="19"><b>Logged by:
<%=RSupdate("RecvBy")%></b></td>
<td width="34%" height="19"><b>Open Date:
<%=FormatDateTime(RSupdate("Opendate"),2)%></b></td>
<td width="34%" height="19"><b></b></td>
</tr>
<tr>
<td width="35%" height="19" colspan="2"><b>Customer Name</b></td>
<td width="31%" height="19"><b>Contact Method </b> </td>
<td width="34%" height="19"> <b>Call Type</b></td>
<td width="34%" height="19">Severity</td>
</tr>
<tr>
<td width="35%" height="22" colspan="2"><b>
<input type="text" name="Custname" size="20"
value="<%=RSupdate("Custname")%>"></b></td>
<td width="31%" height="22"><b>
<select size="1" name="ContactMeth">
<option selected><%=RSupdate("ContactMeth")%></option>
<%
If RSupdate("ContactMeth")= "Email" then
%>
<option>Helpdesk</option>
<option>Other</option>
<option>Phone</option>
<% end if %>
<%
if RSupdate("ContactMeth")= "Helpdesk" Then
%>
<option>Email</option>
<option>Other</option>
<option>Phone</option>
<% end if %>
<%
if RSupdate("ContactMeth")= "Other" Then
%>
<option>Email</option>
<option>Helpdesk</option>
<option>Phone</option>
<% end if %>
<%
If RSupdate("ContactMeth")= "Phone" then
%>
<option>Email</option>
<option>Helpdesk</option>
<option>Other</option>
<%
End if
%>
</select> </b></td>
<td width="34%" height="22"><b>
<select size="1" name="CallTyp" onchange="changeDay(this);">
<%
If RSupdate("CallTyp")= "Question" then
%>
<option selected>Question</option>
<option>Other</option>
<option>Problem</option>
<option></option>
<% end if %>
<%
if RSupdate("CallTyp")= "Other" Then
%>
<option>Question</option>
<option selected>Other</option>
<option>Problem</option>
<option></option>
<% end if %>
<%
if RSupdate("CallTyp")= "" Then
%>
<option>Question</option>
<option>Other</option>
<option>Problem</option>
<option selected></option>
<%
End if
%>
<%
if RSupdate("CallTyp")= "Problem" Then
%>
<option>Question</option>
<option>Other</option>
<option selected>Problem</option>
<option></option>
<%
End if
%>
</select></b></td>
<td width="34%" height="22"><b>
<%
if RSupdate("Severity1")="S1" then
sever1 ="S1"
End if
if RSupdate("Severity2")="S2" then
sever1 ="S2"
End if
%>
<select size="1" name="Severity">
<% if sever1= "S1" then %>
<option selected>S1</option>
<option>S2</option>
<%
End if %>
<% if sever1= "S2" then %>
<option>S1</option>
<option selected>S2</option>
<% end if %>
<% if sever1= "" then %>
<option> </option>
<% end if %>
</select></b>
</td>