Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect page after writing record

Status
Not open for further replies.

MadJock

Programmer
May 25, 2001
318
GB
Folks,

I have an asp page that is used to write data to a SQL server. The form on the page loads itself.

The form must be submitted a minimum of 3 times before there is a sufficient amount of data to write a records (the 1st submit makes enough info available to populate 1st set of combo-boxes and the 2ns submit makes info available to populate the 2nd set of combo-boxes. The 3rd submit writes the record)

I distinguish between what stage of execution I am on by the fields that have been populated.

The main problem is that once the final submit has been done and the record is written - the form stays on the page and all fields are populated. The users are thinking this means nothing has happened and are submitting the record again (and again, and again!!).

How can I redirect the page after the final submit only?

Thanks in advance for any advice.

Graeme website:
 
Thanks,

Unfortunately, this won't work for me. The write part is included in the body of the application, if I try to redirect there - I get an error message.

Is there a way round this? website:
 
try this. When you detect that you are writing the final page. Write a hidden field with a value. At the top of your script check for the field if it is there do your write by itself other wise load the page as normal. I use Mode.

example

<%
if Request(&quot;MODE&quot;) = &quot;Write&quot; then
WriteData()
else
DisplayMyForm()
end if

sub WriteData()
...

end sub

sub displaymyform()
....

end sub

%>
 
I maybe need to re-think my design. My ASP code is below - I'm fairly new to this and unsure how the code you propose would fit with my design.

Code:
<%
' Obtain user's logon
If Request.ServerVariables(&quot;LOGON_USER&quot;) = &quot;&quot; Then
	Response.Status = &quot;401 access denied&quot;
	Response.End  
End If

%>

<html>
<head>
<hta:application navigable=yes />
   
<script type=&quot;text/vbscript&quot;>

sub closeWindow()
	msgBox &quot;Please close this window now&quot;
end sub

sub missingFields()
	msgBox &quot;You are missing some fields.  Have you completed the retention Section?&quot;
end sub

'Function goes to previous url
'Executed when 'undo' button is click
'Has effect of returning form to state before last update

sub undo_click()
	window.history.go -1  
end sub
</script>

<!--Following Code Initialises Database Link-->
<%
'Create Connecction
Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Conn.open &quot;Provider=SQLOLEDB.1;Password=;Persist Security Info=True;User ID=WEBUSER;Initial Catalog=RECON;Data Source=EDINBUR-DMSD&quot;

'Get the user's name from the login
strUser = getNameFromLogin(Request.ServerVariables(&quot;LOGON_USER&quot;))

'Function takes logon and returns the user's name

function getNameFromLogin(cLogin)

dim cPayNo	'Variable to hold taag or 's' number
dim sSQL	'SQL String
dim rsLogin	'Recordset for SQL return
dim cName	'String to hold agent's name

'get ID
cPayNo = mid(cLogin, instr(cLogin, &quot;\&quot;) + 1)

'Create SQL string and execute it
sSQL = &quot;SELECT name FROM tblLogins WHERE login LIKE '&quot; & cPayNo & &quot;';&quot;
set rsLogin = conn.Execute(sSQL)

if rsLogin.BOF and rsLogin.EOF  THEN 'No Match is found
	cName = cPayNo  'Use the login
else
	'get the name from the recordset
	cName = rsLogin(&quot;name&quot;)
end if

'close the recordset
rsLogin.close

'return the name
getNameFromLogin = cName
	
end function

'SET MANAGER QUERY STRING ACCORDING TO EVENT
if request.querystring(&quot;cboManager&quot;) <> &quot;&quot; THEN
	managerSQL = &quot;SELECT PayNo, ManagerName FROM tblManager WHERE PayNo LIKE '&quot; & request.querystring(&quot;cboManager&quot;) & &quot;';&quot;
else
	managerSQL = &quot;SELECT PayNo, ManagerName FROM tblManager&quot;
end if

'SET DEPARTMENT QUERY STRING ACCORDING TO EVENT
if request.querystring(&quot;cboDept&quot;) <> &quot;&quot; THEN
	deptSQL = &quot;SELECT DEPTID, DESCRIP FROM tblDept WHERE DEPTID LIKE '&quot; & request.querystring(&quot;cboDept&quot;) & &quot;';&quot;
else
	deptSQL = &quot;SELECT DEPTID, DESCRIP FROM tblDept;&quot;
end if

'SET CALLTYPE QUERY STRING ACCORDING TO EVENT
if request.querystring(&quot;cboCallType&quot;) <> &quot;&quot; THEN
	callSQL = &quot;SELECT CALLTYPEID, DESCRIP FROM tblCalltype WHERE CALLTYPEID LIKE '&quot; & request.queryString(&quot;cboCalltype&quot;) & &quot;';&quot;
else
	callSQL = &quot;SELECT CALLTYPEID, DESCRIP FROM tblCalltype;&quot;
end if

'SET RECONTYPE QUERY STRING ACCORDING TO EVENT
if request.querystring(&quot;cboReconType&quot;) <> &quot;&quot; THEN
	reconSQL = &quot;SELECT COMPLAINTTYPEID, DESCRIP FROM tblComplaintType WHERE COMPLAINTTYPEID LIKE '&quot; & Request.QueryString(&quot;cboReconType&quot;) & &quot;';&quot;
else
	reconSQL = &quot;SELECT COMPLAINTTYPEID, DESCRIP FROM tblComplaintType;&quot;
end if

'SET CATEGORY QUERY STRING ACCORDING TO EVENT
if request.querystring(&quot;cboCategory&quot;) <> &quot;&quot; THEN
	categorySQL = &quot;SELECT catid, DESCRIP FROM tblCategory WHERE catid LIKE '&quot; & Request.QueryString(&quot;cboCategory&quot;) & &quot;';&quot;
else
	categorySQL = &quot;SELECT catid, DESCRIP FROM tblCategory WHERE complainttypeid Like '&quot; & Request.QueryString(&quot;cboReconType&quot;) & &quot;';&quot;
end if

'SET SUBCATEGORY QUERY STRING ACCORDING TO EVENT
if request.querystring(&quot;cboSubCat&quot;) <> &quot;&quot; THEN
	subSQL = &quot;SELECT SUBCATID, SUBCATDESCRIP FROM tblSubCat WHERE SUBCATID LIKE '&quot; & Request.QueryString(&quot;cboSubCat&quot;) & &quot;';&quot;
else
	subSQL = &quot;SELECT SUBCATID, SUBCATDESCRIP FROM tblSubCat WHERE categoryid like '&quot; & Request.QueryString(&quot;cboCategory&quot;) & &quot;';&quot;
end if

'DETERMINE IF INPUT IS FINISHED
if request.QueryString(&quot;bWithdrawing&quot;) <> &quot;&quot; then
	if request.queryString(&quot;bRetained&quot;) <> &quot;&quot; then
		if request.queryString(&quot;bMel&quot;) <> &quot;&quot; then
				if request.queryString(&quot;bCallback&quot;) <> &quot;&quot; then
					bFinished = &quot;TRUE&quot;
				end if
		end if
	end if
end if

%>

<script language=&quot;JavaScript&quot;>
<!--
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf(&quot;?&quot;))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf(&quot;#&quot;)!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//-->
</script>
	
<base target=&quot;main&quot;>
	
</head>


<!--Setup the form-->


<form action=&quot;recon.asp&quot; target=&quot;_self&quot; method=&quot;GET&quot; name=&quot;ReconForm&quot;>
    
  <table width=&quot;100%&quot; CELLSPACING=&quot;0&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#808080&quot; height=&quot;443&quot; style=&quot;border-style: outset; border-color: #BFBFBF&quot;>
    <tr> 
      <td bgcolor=&quot;#000080&quot; height=&quot;64&quot; width=&quot;35&quot; bordercolor=&quot;#000080&quot; align=&quot;center&quot;>
         
      </td>
      <td colspan=&quot;3&quot; height=&quot;64&quot; width=&quot;687&quot; bgcolor=&quot;#000080&quot;>
        <div align=&quot;center&quot;><b><font face=&quot;Verdana&quot; color=&quot;#FFFFFF&quot;><font size=&quot;4&quot;>Input required 
          data below, when you have finished, click 'SUBMIT'</font><font size=&quot;5&quot;><br>
          <font size=&quot;2&quot;>If you make a mistake, just use the 'Undo' button below</font> </font></font></b></div>
      </td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;21&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot;><font face=&quot;Verdana&quot; size=&quot;2&quot;> </font></td>
      <td width=&quot;298&quot; height=&quot;21&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>Agent Name</font></td>
      <td width=&quot;281&quot; height=&quot;21&quot;> 
       <font face=&quot;Verdana&quot; size=&quot;2&quot;> 
       <%response.write(&quot;<B>&quot;&strUser&&quot;</B>&quot;)%>
       </font>
      </td>
      <td width=&quot;104&quot; height=&quot;21&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;> </font></td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;25&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>1</font></b></td>
      <td width=&quot;298&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>Manager Name</font></td>
      <td width=&quot;281&quot; height=&quot;25&quot; > 
        <font face=&quot;Verdana&quot; size=&quot;2&quot;> 
        <select size=&quot;1&quot; name=&quot;cboManager&quot; style=&quot;width: 100%;&quot;>
          <%
			Set rs = Conn.Execute(managerSQL)
			Do while not rs.eof
				Response.write &quot;<option value='&quot; & rs(&quot;PayNo&quot;) & &quot;'>&quot;
				Response.write rs(&quot;ManagerName&quot;)
				Response.write &quot;</option>&quot;
				rs.MoveNext
			Loop
			rs.close
			set rs=nothing
		%>
        </select>
        </font>
      </td>
      <td width=&quot;104&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;> </font></td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;25&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>2</font></b></td>
      <td width=&quot;298&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>Department</font></td>
      <td width=&quot;281&quot; height=&quot;25&quot; > 
        <font face=&quot;Verdana&quot; size=&quot;2&quot;> 
        <select size=&quot;1&quot; name=&quot;cboDept&quot; width=&quot;200&quot; style=&quot;width: 100%;&quot;>
          <%
				Set rs = Conn.Execute(deptSQL)
				Do while not rs.eof
					Response.write &quot;<option value='&quot; & rs(&quot;DEPTID&quot;) & &quot;'>&quot;
					Response.write rs(&quot;DESCRIP&quot;)
					Response.write &quot;</option>&quot;
					rs.MoveNext
				Loop
			rs.close
			set rs=nothing
		%>
        </select>
        </font>
      </td>
      <td width=&quot;104&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;> </font></td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;25&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>3</font></b></td>
      <td width=&quot;298&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>Call Type</font></td>
      <td width=&quot;281&quot; height=&quot;25&quot; > 
        <font face=&quot;Verdana&quot; size=&quot;2&quot;> 
        <select size=&quot;1&quot; name=&quot;cboCallType&quot; style=&quot;width: 100%;&quot;>
          <%
			Set rs = Conn.Execute(callSQL)

			Do while not rs.eof
				Response.write &quot;<option value='&quot; & rs(&quot;CALLTYPEID&quot;) & &quot;'>&quot;
				Response.write rs(&quot;DESCRIP&quot;)
				Response.write &quot;</option>&quot;
				rs.MoveNext
			Loop
		rs.close
		set rs=nothing
		%>
        </select>
        </font>
      </td>
      <td width=&quot;104&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;> </font></td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;25&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>4</font></b></td>
      <td width=&quot;298&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>Recon Type</font></td>
      <td width=&quot;281&quot; height=&quot;25&quot; > 
        <font face=&quot;Verdana&quot; size=&quot;2&quot;> 
        <select size=&quot;1&quot; name=&quot;cboReconType&quot; style=&quot;width: 100%;&quot;>
          <%
			Set rs = Conn.Execute(reconSQL)
			Do while not rs.eof
				Response.write &quot;<option value='&quot; & rs(&quot;COMPLAINTTYPEID&quot;) & &quot;'>&quot;
				Response.write rs(&quot;DESCRIP&quot;)
				Response.write &quot;</option>&quot;
				rs.MoveNext
			Loop
		 rs.close
		 set rs=nothing
		%>
        </select>
        </font>
      </td>
      <td width=&quot;104&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;> </font></td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;25&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>5</font></b></td>
      <td width=&quot;298&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>Category</font></td>
      <td width=&quot;281&quot; height=&quot;25&quot; > 
        <font face=&quot;Verdana&quot; size=&quot;2&quot;> 
        <select size=&quot;1&quot; name=&quot;cboCategory&quot; style=&quot;width: 100%;&quot;>
          <% 
			Set rs = Conn.Execute(categorySQL)
			Do while not rs.eof
				Response.write &quot;<option value='&quot; & rs(&quot;catid&quot;) & &quot;'>&quot;
				Response.write rs(&quot;DESCRIP&quot;)
				Response.write &quot;</option>&quot;
				rs.MoveNext
			Loop
			rs.close
			set rs=nothing
       %>
        </select>
        </font>
      </td>
      <td width=&quot;104&quot; bgcolor=&quot;#808080&quot; height=&quot;25&quot; ><img border=&quot;0&quot; src=&quot;getCat.gif&quot; onClick=&quot;submit()&quot;></td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;26&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>6</font></b></td>
      <td width=&quot;298&quot; height=&quot;26&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>Sub Category</font></td>
      <td width=&quot;281&quot; height=&quot;26&quot; > 
        <font face=&quot;Verdana&quot; size=&quot;2&quot;> 
        <select size=&quot;1&quot; name=&quot;cboSubCat&quot; style=&quot;width: 100%;&quot;>
          <%
        if Request.QueryString(&quot;cboCategory&quot;) <> &quot;&quot; THEN
				Set rs = Conn.Execute(subSQL)
				Do while not rs.eof
					Response.write &quot;<option value='&quot; & rs(&quot;SUBCATID&quot;) & &quot;'>&quot;
					Response.write rs(&quot;SUBCATDESCRIP&quot;)
					Response.write &quot;</option>&quot;
					rs.MoveNext
				Loop
		 	rs.close
		 	set rs=nothing
		 end if
		%>
        </select>
        </font>
      </td>
      <td width=&quot;104&quot; height=&quot;26&quot; ><img border=&quot;0&quot; src=&quot;getsubcat.gif&quot; onClick=&quot;submit()&quot;></td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;25&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>7</font></b></td>
      <td width=&quot;298&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>CRN</font></td>
      <td width=&quot;281&quot; height=&quot;25&quot; > 
        <font face=&quot;Verdana&quot; size=&quot;2&quot;> 
        <input type=&quot;text&quot; name=&quot;txtCRN&quot;  maxlength=&quot;13&quot; value=&quot;<%Response.Write Request.QueryString(&quot;txtCRN&quot;)%>&quot; size=&quot;39&quot;>
        </font>
      </td>
      <td width=&quot;104&quot; height=&quot;25&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;> </font></td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;19&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>8</font></b></td>
      <td width=&quot;298&quot; height=&quot;19&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>Recon Callback
        Required?</font></td>
      <td width=&quot;385&quot; height=&quot;19&quot; colspan=&quot;2&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>YES 
        <input type=&quot;radio&quot; value=&quot;1&quot; name=&quot;bCallback&quot; 
        <% if request.queryString(&quot;bCallback&quot;) = &quot;1&quot; then response.write &quot;checked&quot; end if%>>
        NO 
        <input type=&quot;radio&quot; name=&quot;bCallback&quot; value=&quot;0&quot; 
          <% if request.queryString(&quot;bCallback&quot;) = &quot;0&quot; then response.write &quot;checked&quot; end if%>>
        TEL</font> <input type=&quot;text&quot; name=&quot;cTelNo&quot; size=&quot;20&quot;>
      </td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;19&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>9</font></b></td>
      <td width=&quot;298&quot; height=&quot;19&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>Withdrawal Mentioned</font></td>
      <td width=&quot;281&quot; height=&quot;19&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>YES 
        <input type=&quot;radio&quot; value=&quot;1&quot; name=&quot;bWithdrawing&quot; 
        <% if request.queryString(&quot;bWithdrawing&quot;) = &quot;1&quot; then response.write &quot;checked&quot; end if%>>
        NO 
        <input type=&quot;radio&quot; name=&quot;bWithDrawing&quot; value=&quot;0&quot; 
          <% if request.queryString(&quot;bWithdrawing&quot;) = &quot;0&quot; then response.write &quot;checked&quot; end if%>></font>
      </td>
      <td width=&quot;104&quot; height=&quot;19&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;> </font></td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;19&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>10</font></b></td>
      <td width=&quot;298&quot; height=&quot;19&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>Mind Changed?</font></td>
      <td width=&quot;281&quot; height=&quot;19&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>YES 
        <input type=&quot;radio&quot; name=&quot;bRetained&quot; value=&quot;1&quot;
        <% if request.queryString(&quot;bRetained&quot;) = &quot;1&quot; then response.write &quot;checked&quot; end if%>>
        NO 
        <input type=&quot;radio&quot; name=&quot;bRetained&quot; value=&quot;0&quot;
          <% if request.queryString(&quot;bRetained&quot;) = &quot;0&quot; then response.write &quot;checked&quot; end if%>>
        </font>
      </td>
      <td width=&quot;104&quot; height=&quot;19&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;> </font></td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;19&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot; ><b><font face=&quot;Verdana&quot; size=&quot;2&quot;>11</font></b></td>
      <td width=&quot;298&quot; height=&quot;19&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>I Have Raised a
        MEL </font></td>
      <td width=&quot;385&quot; height=&quot;19&quot; colspan=&quot;2&quot; ><font face=&quot;Verdana&quot; size=&quot;2&quot;>YES 
        <input type=&quot;radio&quot; name=&quot;bMel&quot; value=&quot;1&quot;
        <% if request.queryString(&quot;bMel&quot;) = &quot;1&quot; then response.write &quot;checked&quot; end if%>>
        NO 
        <input type=&quot;radio&quot; name=&quot;bMel&quot; value=&quot;0&quot;		 
	<% if request.queryString(&quot;bMel&quot;) = &quot;0&quot; then response.write &quot;checked&quot; end if%>></font>     
        <b><font face=&quot;Verdana&quot; size=&quot;2&quot; color=&quot;#0000FF&quot;>(Only if customer
        demands a mgr)</font></b>
      </td>
    </tr>
    <tr> 
      <td  width=&quot;33&quot; height=&quot;78&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot;> 
        <b><font face=&quot;Verdana&quot; size=&quot;2&quot;>12</font></b>
      </td>
      <td colspan=&quot;3&quot;  width=&quot;100%&quot; height=&quot;78&quot; valign=&quot;bottom&quot;> 
        <div align=&quot;center&quot;>
          <hr>
          <font face=&quot;Verdana&quot; size=&quot;2&quot;>Comments : <sup><br>
          </sup> 
          <textarea rows=&quot;2&quot; name=&quot;txtComments&quot; cols=&quot;72&quot; value=&quot;<%response.Write txtComments%>&quot;></textarea>
          </font>
          <hr>
        </div>
      </td>
    </tr>
    <tr> 
      <td width=&quot;33&quot; height=&quot;26&quot; bordercolor=&quot;#808080&quot; style=&quot;border-right-style: groove&quot; align=&quot;center&quot;> 
        <b><font face=&quot;Verdana&quot; size=&quot;2&quot;>13</font></b>
      </td>
      <td colspan=&quot;3&quot;  width=&quot;687&quot; height=&quot;26&quot;> 
    <p align=&quot;center&quot;> 
    <input type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;B1&quot; style=&quot;border-style: outset; border-color: #C0C0C0&quot;><input type=&quot;button&quot; value=&quot;Undo&quot; name=&quot;undo&quot; onClick=&quot;undo_Click()&quot; style=&quot;border-style: outset; border-color: #C0C0C0&quot;>



      </td>
    </tr>
  </table>
</form>
<%
	if bFinished = &quot;TRUE&quot; THEN   'All necessary items are completed
	
		'Get all info that is to be written to database
		managerpayno = request.querystring(&quot;cboManager&quot;)
		crn = request.querystring(&quot;txtcrn&quot;)
		details = request.querystring(&quot;txtcomments&quot;)
		subcatid = request.querystring(&quot;cboSubcat&quot;)
		calltypeid = request.querystring(&quot;cboCallType&quot;)
		complainttypeid = request.querystring(&quot;cboReconType&quot;)
		categoryid = request.querystring(&quot;cboCategory&quot;)
		wantstowd = request.querystring(&quot;bWithdrawing&quot;)
		mindchanged = request.querystring(&quot;bRetained&quot;)
		deptid = request.querystring(&quot;cboDept&quot;)
		melraised = request.querystring(&quot;bMel&quot;)
		lCallBack = request.querystring(&quot;bCallBack&quot;)
		telno = request.querystring(&quot;cTelNo&quot;)
		'Create SQL Query that will update database
		strUpdateTable = &quot;INSERT INTO tblRecon (Agent, managerpayno, crn, details, subcatid, calltypeid, complainttypeid, categoryid, wantstowd, mindchanged, deptid, melraised, dateraised, timeraised, callback, telno) VALUES ('&quot; &  strUser & &quot;','&quot; &  managerpayno & &quot;','&quot; &  crn & &quot;','&quot; &  details & &quot;','&quot; & subcatid & &quot;','&quot; & calltypeid & &quot;','&quot; &  complainttypeid & &quot;','&quot; &  categoryid & &quot;','&quot; & wantstowd & &quot;','&quot; &  mindchanged & &quot;','&quot; &  deptid & &quot;','&quot; &  melraised & &quot;','&quot; & date & &quot;','&quot; & FormatDateTime(time, 3) & &quot;','&quot; & lCallback & &quot;','&quot; & telno & &quot;');&quot;
	
		'Execute Query
		set rsNew = conn.execute(strUpdateTable)

		'Close Window	
		set rsNew = nothing
		set conn = nothing
		response.write &quot;<script>call closeWindow()</script>&quot;
		
	else
	  if request.querystring(&quot;cboManager&quot;) <>&quot;&quot; then
	    if request.querystring(&quot;txtcrn&quot;) <> &quot;&quot; then
	      if request.querystring(&quot;cboSubcat&quot;) <> &quot;&quot; then
	        if request.querystring(&quot;cboCategory&quot;) <> &quot;&quot; then
		  response.write &quot;<script>call missingFields()</script>&quot;
	        end if
	      end if
	    end if
	  end if
	end if
%>
<table border=&quot;1&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
  <tr>
    <td width=&quot;50%&quot;><font face=&quot;Verdana&quot;><font size=&quot;2&quot;>

If you have any difficulties or feedback, please contact:</font><br>
<b><font size=&quot;2&quot;>Graeme Taylor<br>
Edinburgh Development Team<br>
Whitehouse<BR>
ext 15522</font>

  </b>

</font></td>
    <td width=&quot;50%&quot;>
      <p align=&quot;right&quot;><font size=&quot;2&quot; face=&quot;Verdana&quot;>If you would like to
      clarify RECON procedure, contact:</font><br>
      <font size=&quot;2&quot; face=&quot;Verdana&quot;><b>Keith McLachlan<br>
      Service Improvement Team <br>
      Upper Whitehouse<br>
      Ext 1569</b></font></td>
  </tr>
</table>

You have been a great help already though...thanks website:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top