473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Form action problem


Trying to fix a web site I inherited. Problem is with the *help* page.
User fills out form and hits send. The browser comes back with Error
Number 424, Error Description Object Required, Key Name Comments.

Code follows (I replaced <> with *)
*td valign="top" align="left" width="150"*
*form action="he*****************************@acccap.com ?subject=Web
Comments" method="post"*
Your Name:
*/td*
*td valign="top" align="left" width="150"*
*input type="text" name="Fullname" size="20" maxlength="100"*
*/td*
*/tr*
*tr*
*td valign="top" align="left" width="150"*
Company:
*/td*
*td valign="top" align="left" width="150"*
*input type="text" name="Company" size="20" maxlength="100"*
*/td*
*/tr*
*tr*
*td valign="top" align="left" width="150"*
Email:
*/td*
*td valign="top" align="left" width="150"*
*input type="text" name="Email" size="20" maxlength="100"*
*/td*
*/tr*
*tr*
*td valign="top" align="left" width="150"*
Comments:
*/td*
*td valign="top" align="left" width="150"*
*textarea cols="20" rows="8" name="Comments"**/textarea*
*/td*
*/tr*
*tr*
*td valign="top" align="left" width="150"*
*br*
*input type="submit" name="submit" value="Send" onClick="helpThanks()"*
*/td*
*td valign="top" align="left" width="150"*
*br*
*input type="Reset" value="Reset Form"* */form*
*/td*
*/tr*
*/table*

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
4 2948
Looks like a really poorly made form...

Try this:

<form action="helpsend.asp">
<input type="hidden" name="sendto" value="su*********@acccap.com">
<input type="hidden" name="subject" value="web comments">
"Horhayson" <ho*******@nospamplease.net> wrote in message
news:uR**************@TK2MSFTNGP10.phx.gbl...

Trying to fix a web site I inherited. Problem is with the *help* page.
User fills out form and hits send. The browser comes back with Error
Number 424, Error Description Object Required, Key Name Comments.

Code follows (I replaced <> with *)
*td valign="top" align="left" width="150"*
*form action="helpSend.asp?sendto=su*********@acccap.com ?subject=Web
Comments" method="post"*
Your Name:
*/td*
*td valign="top" align="left" width="150"*
*input type="text" name="Fullname" size="20" maxlength="100"*
*/td*
*/tr*
*tr*
*td valign="top" align="left" width="150"*
Company:
*/td*
*td valign="top" align="left" width="150"*
*input type="text" name="Company" size="20" maxlength="100"*
*/td*
*/tr*
*tr*
*td valign="top" align="left" width="150"*
Email:
*/td*
*td valign="top" align="left" width="150"*
*input type="text" name="Email" size="20" maxlength="100"*
*/td*
*/tr*
*tr*
*td valign="top" align="left" width="150"*
Comments:
*/td*
*td valign="top" align="left" width="150"*
*textarea cols="20" rows="8" name="Comments"**/textarea*
*/td*
*/tr*
*tr*
*td valign="top" align="left" width="150"*
*br*
*input type="submit" name="submit" value="Send" onClick="helpThanks()"*
*/td*
*td valign="top" align="left" width="150"*
*br*
*input type="Reset" value="Reset Form"* */form*
*/td*
*/tr*
*/table*

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2
We'd need to see the code in helpsend.asp, not the HTML of the page that
GETs to that page. Oh, wait, it posts with a querystring. That's
different. Did you inherit this from an ex-employee?

Ray at work

"Horhayson" <ho*******@nospamplease.net> wrote in message
news:uR**************@TK2MSFTNGP10.phx.gbl...

Trying to fix a web site I inherited. Problem is with the *help* page.
User fills out form and hits send. The browser comes back with Error
Number 424, Error Description Object Required, Key Name Comments.

Code follows (I replaced <> with *)
*td valign="top" align="left" width="150"*
*form action="he*****************************@acccap.com ?subject=Web
Comments" method="post"*
Your Name:

Jul 19 '05 #3
Here is the code to helpsend.asp. Yes, the employee is no longer with
the company, so I have to attempt to get into his thought processes.
<% Response.Buffer = True

On Error Resume Next

Function URLDecode(strToDecode)
strIn = strToDecode
strOut = ""
intPos = InStr(strIn, "+")
Do While intPos
strLeft = ""
strRight = ""
If intPos > 1 Then strLeft = Left(strIn, intPos - 1)
If intPos < Len(strIn) Then strRight = Mid(strIn, intPos + 1)
strIn = strLeft & " " & strRight
intPos = InStr(strIn, "+")
intLoop = intLoop + 1
Loop
intPos = InStr(strIn, "%")
Do While intPos
If intPos > 1 Then strOut = strOut & Left(strIn, intPos -1)
strOut = strOut & Chr(CInt("&H" & Mid(strIn, intPos + 1, 2)))
If intPos > (Len(strIn) - 3) Then
strIn = ""
Else
strIn = Mid(strIn, intPos + 3)
End If
intPos = InStr(strIn, "%")
Loop
URLDecode = strOut & strIn
End Function

Set objResult = Server.CreateObject("Scripting.Dictionary")

strQuery = Request.Form

intSep = InStr(strQuery, "&")
Do While intSep
strKey = ""
strValue = ""
strNVPair = Left(strQuery, intSep - 1)
strQuery = Mid(strQuery, intSep + 1)
intEqu = InStr(strNVPair, "=")
If intEqu > 1 Then strKey = URLDecode(Left(strNVPair, intEqu - 1))
If intEqu < Len(strNVPair) Then strValue = URLDecode(Mid(strNVPair,
intEqu + 1))
objResult.Add strKey, strValue
strErrorName = strKey
intSep = InStr(strQuery, "&")
Loop
strKey = ""
strValue = ""
intEqu = InStr(strQuery, "=")
If intEqu > 1 Then strKey = URLDecode(Left(strQuery, intEqu - 1))
If intEqu < Len(strNVPair) Then strValue = URLDecode(Mid(strQuery,
intEqu + 1))
objResult.Add strKey, strValue

Dim strToEmail
strToEmail = "-----------------------------" & vbNewLine & "Help Page
Feedback"
strToEmail = strToEmail & vbNewLine & "-----------------------------" &
vbNewLine & vbNewLine
strKeysArray = objResult.Keys
strItemsArray = objResult.Items
For intLoop = 0 To objResult.Count - 1
strThisKey = strKeysArray(intLoop)
strThisItem = strItemsArray(intLoop)
strToEmail = strToEmail & strThisKey & " = " & strThisItem & vbNewLine
Next

strSendToEmail = Request.QueryString("sendto")
Set mailer = Server.CreateObject("ASPMAIL.ASPMailCtrl.1")
temp = mailer.SendMail("somemailserver.com", strSendToEmail, "ACC Site
Visitor", "Comments about the site", strToEmail)

If Err.Number = 0 then
Response.Redirect("help-page.asp")
Else
If Err.Number = 457 Then
Response.Write("The form that is being submitted uses the same name
for ")
Response.Write("more than one form element, please contact <a
href='" & strSendToEmail & "'>")
Response.Write( strSendToEmail & "</a> to have this error fixed." &
vbNewLine )
Else
Response.Write("<DIV>Error Number: '" & Err.Number & "'<BR>")
Response.Write("Error Description: '" & Err.Description & "'<P>")
Response.Write("Key Name: '" & strErrorName & "'<BR>")
Response.Write("<B>There was a problem processing your form. Click
the back button and try it again please.<BR><BIG>Mills
Publishing</BIG></B></DIV>")
End If
End If
%>


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4
Okay, and on what line is the error?

If I were you, I'd redo this form from scratch. All this querystring
nonsense in the method=post is odd. Also, what's with the urldecode
function? Why? And why is this person parsing the form collection himself?
Odd.

Ray at work

"Horhayson" <ho*******@nospamplease.net> wrote in message
news:uM**************@TK2MSFTNGP09.phx.gbl...
Here is the code to helpsend.asp. Yes, the employee is no longer with
the company, so I have to attempt to get into his thought processes.
<% Response.Buffer = True

On Error Resume Next

Function URLDecode(strToDecode)
strIn = strToDecode
strOut = ""
intPos = InStr(strIn, "+")
Do While intPos
strLeft = ""
strRight = ""[TRIM]

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bill S. | last post by:
Hi, I am just starting to work with ASP, so bear that in mind... I have an ASP page that displays records from a table, and allows you to add, update and delete. There is a form with one...
5
by: Jan Gregor | last post by:
Hello I want to change attribute action in form. Problem is that in that form is also input with name action. Unfortunately renaming of that input is worst case because many servlets depend on...
5
by: Markus Ernst | last post by:
Hi I have a validation problem with a form and nested divs. I understand what the problem is, but I don't see how to fix it. This is my normal page structure, and it validates: <!DOCTYPE HTML...
10
by: iam247 | last post by:
Hi In my prototype asp page (with no javascript and no password validation, I have a registration form with the following action: <form name="form" method="post" action="RegDetails.asp"> ...
5
by: rjames.clarke | last post by:
I have the following. $result=mysql_query($sql); $nrows=mysql_num_rows($result); for ($i=0;$i<$nrows;$i++) { $row_array=mysql_fetch_row($result); echo "<form name='testform'...
2
by: Myk Quayce | last post by:
I have a small .aspx page that uses old style forms with client-side JavaScript validation. Everything works fine until I try to upate the database with some new information. I must be doing...
4
by: Lee Chapman | last post by:
Hi, Can anyone tell me why in the code below, the call to ClearChildViewState() has no effect? To paraphrase the code: I'm using view state. I have a textbox and a submit button (and a label...
13
by: deko | last post by:
I have a basic feedback form with a submit button. After the "send" button is clicked, I want the user to be redirected to a different page that says "Your message has been sent." How do I do...
12
by: Daniel Klein | last post by:
I'm pretty new at php and web stuff so please be gentle with me. I'm trying to get a form to submit when the user presses the Enter key. I do not want to use javascript. I've googled this to...
1
by: chromis | last post by:
Hi, I'm having trouble fully implementing the edit section of a contact admin system, so far I have written the following: - Bean (Contact.cfc) - Data Access object (ContactDAO.cfc) - Gateway...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.