Hello all ,
Help required!!
I have 2 asp pages.
<form ACTION="Feedback_Administration_Update.asp" METHOD=POST NAME="form">
<input type="button" value="Submit" onclick="javascript
:Checkit();" name="btnSubmit">
<input type="reset" value="Reset" onclick="javascript
:document.location=location">
<input type="button" value="Send Response to Requester" name="btnSubmit" onclick="javascript
:Checkit();"/>
</form>
in Feedback_Administration_Update.asp
I am using following code
dim buttonPressed
buttonPressed=Request.Form("btnSubmit")
select case buttonPressed
case "Submit"
Set objConn = Server.CreateObject("ADODB.Connection")
objconn.Open Application("conn")
Set objRS = Server.CreateObject("ADODB.Recordset")
Err.Clear
On Error Resume Next
strSQL = "UPDATE [Feedback] SET "
strSQL = strSQL & "Initial_Response_Date = '" & strInitial_Resp_Date & "', "
strSQL = strSQL & "Committed_Action_Date = '" & strCommitted_Action_Date & "', "
strSQL = strSQL & "Final_Outcome = '" & strFinal_Outcome & "', "
strSQL = strSQL & "Closed = '" & intClosed & "', "
strSQL = strSQL & "Closed_Date = '" & strClosed_Date & "', "
strSQL = strSQL & "RespAssignedTo = '" & strRespAssignedTo & "' "
strSQL = strSQL & " WHERE (ID = '" & strID & "')"
'response.Write(strSQL)
objRS.Open strSQL, objConn, 3, 2
'objconn.Execute strSQL
'Error Handling Part
If Err.Number <> 0 Then
Response.Buffer = True
Response.Redirect "ShowError.asp?ErrNum=" & Err.number & "&ErrSource=" & Err.source & "&ErrDesc=" & Err.description
End If
On Error GoTo 0
'End Error Handling Part
'strSQL = "SELECT * FROM Feedback WHERE (ID = " & strID & ")"
objconn.Close
set objRS = nothing
Set objConn = nothing
Response.Redirect "feedback_administration.asp?ID=" & regEx.Replace((request.form("ID")), "''") & "&lstPages=" & Trim(Request("lstPages")) & "&view=" & Request("view")& "&strSuccess1=" &"Success"
case "Send Response to Requester"
Dim ObjSendMail
Dim strMailTo
Dim HTML
Set ObjSendMail = CreateObject("CDO.Message")
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mailgate.qintra.com"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
ObjSendMail.Configuration.Fields.Update
ObjSendMail.To = "
[email protected]"
ObjSendMail.Subject = "Response to your Business Improvement Feedback"
ObjSendMail.From = "CIA Feedback<
[email protected] >"
ObjSendMail.HTMLBody = "<p>Test mail</p>"
ObjSendMail.Send
End Select
I am not sure why they are not working on clicking any button.
when I click on submit the page ,it should update the code
when I click on submit Send Response to Requester,it should send email. Please help me.