Home All Groups Group Topic Archive Search About
Author
7 Jul 2009 2:45 PM
Shawn Ferguson
I have a very weird problem.  I have a form that post to an ASP page, when I try to retrieve those values from the form using this:
-------------------------------------------
myField = request.form("frmFname") <-- Error line
response.write "This is a test " & myField
-------------------------------------------
I receive an error :

Microsoft VBScript runtime error '800a01a8'
Object required: ''

Prior to receiving this error, I was receiving a Type Mismatch on this (error was on the if statement):
-------------------------------------------
IF REQUEST("FRMfNAME") = "" THEN <-- Error line
RESPONSE.WRITE "TEST"
'response.write "This is username" & request("frmFName")
response.End()
END IF
-------------------------------------------

If you could provide any assistance, that would be great seems very strange especially considering when I put the form in a page by itself, it worked fine retrieving the variables. 


Shawn M. Ferguson
Supervisor of Information Services
sferg***@cscc.edu
1(800)621-6407
(614) 287-2502 Voice
(614) 287-5488 FAX

Author
7 Jul 2009 5:47 PM
Adrienne Boswell
Gazing into my crystal ball I observed "Shawn Ferguson"
Show quoteHide quote
<SFerg***@cscc.edu> writing in news:4A532762.48BE.0071.0@cscc.edu:

> I have a very weird problem.  I have a form that post to an ASP page,
> when I try to retrieve those values from the form using this:
> ------------------------------------------- myField =
> request.form("frmFname") <-- Error line response.write "This is a test
> " & myField -------------------------------------------
> I receive an error :
>
> Microsoft VBScript runtime error '800a01a8'
> Object required: ''
>
> Prior to receiving this error, I was receiving a Type Mismatch on this
> (error was on the if statement):
> ------------------------------------------- IF REQUEST("FRMfNAME") =
> "" THEN <-- Error line
>  RESPONSE.WRITE "TEST"
> 'response.write "This is username" & request("frmFName")
> response.End()
> END IF
> -------------------------------------------
>
> If you could provide any assistance, that would be great seems very
> strange especially considering when I put the form in a page by
> itself, it worked fine retrieving the variables. 
>
>
<long signature snipped - hint it should be two dashes a space and a
carrige return followed by at most three lines of text>

<snip HTML - please do not post to Usenet in HTML - always use plain
text>

I know that some people recommend using an abbreviation of the type of
field and appending the field name to it, but I think it's extra work
and rather silly.  If you name your fields the same as fields in your
db, you'll be a lot happier.

What happens when you loop through the request.form object?

<% For ix = 1 to Request.Form.Count
    fieldName = Request.Form.Key(ix)
    fieldValue = Request.Form.Item(ix)
    response.write fieldname & "=" & fieldvalue
Next
%>

Are you sure that anything was posted?

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Are all your drivers up to date? click for free checkup

Author
7 Jul 2009 6:09 PM
Shawn Ferguson
Tried adding your code and received the same message:

Microsoft VBScript runtime error '800a01a8'
Object required: ''

Any other thoughts???  Very strange - I consider myself a decent programmer but this has me STUCK!

Shawn M. Ferguson
Supervisor of Information Services
sferg***@cscc.edu
1(800)621-6407
(614) 287-2502 Voice
(614) 287-5488 FAX


>>> Adrienne Boswell<arb***@yahoo.com> 7/7/2009 1:47 PM >>>
Gazing into my crystal ball I observed "Shawn Ferguson"
Show quoteHide quote
<SFerg***@cscc.edu> writing in news:4A532762.48BE.0071.0@cscc.edu:

> I have a very weird problem.  I have a form that post to an ASP page,
> when I try to retrieve those values from the form using this:
> ------------------------------------------- myField =
> request.form("frmFname") <-- Error line response.write "This is a test
> " & myField -------------------------------------------
> I receive an error :
>
> Microsoft VBScript runtime error '800a01a8'
> Object required: ''
>
> Prior to receiving this error, I was receiving a Type Mismatch on this
> (error was on the if statement):
> ------------------------------------------- IF REQUEST("FRMfNAME") =
> "" THEN <-- Error line
>  RESPONSE.WRITE "TEST"
> 'response.write "This is username" & request("frmFName")
> response.End()
> END IF
> -------------------------------------------
>
> If you could provide any assistance, that would be great seems very
> strange especially considering when I put the form in a page by
> itself, it worked fine retrieving the variables. 
>
>
<long signature snipped - hint it should be two dashes a space and a
carrige return followed by at most three lines of text>

<snip HTML - please do not post to Usenet in HTML - always use plain
text>

I know that some people recommend using an abbreviation of the type of
field and appending the field name to it, but I think it's extra work
and rather silly.  If you name your fields the same as fields in your
db, you'll be a lot happier.

What happens when you loop through the request.form object?

<% For ix = 1 to Request.Form.Count
    fieldName = Request.Form.Key(ix)
    fieldValue = Request.Form.Item(ix)
    response.write fieldname & "=" & fieldvalue
Next
%>

Are you sure that anything was posted?

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Author
8 Jul 2009 12:52 AM
Adrienne Boswell
Gazing into my crystal ball I observed "Shawn Ferguson"
<SFerg***@cscc.edu> writing in news:4A53570A.48BE.0071.0@cscc.edu:

Please do not top post.  Post corrected, see bottom.

Show quoteHide quote
>>>> Adrienne Boswell<arb***@yahoo.com> 7/7/2009 1:47 PM >>>
> Gazing into my crystal ball I observed "Shawn Ferguson"
><SFerg***@cscc.edu> writing in news:4A532762.48BE.0071.0@cscc.edu:
>
>> I have a very weird problem.  I have a form that post to an ASP page,
>> when I try to retrieve those values from the form using this:
>> ------------------------------------------- myField =
>> request.form("frmFname") <-- Error line response.write "This is a
>> test " & myField -------------------------------------------
>> I receive an error :
>>
>> Microsoft VBScript runtime error '800a01a8'
>> Object required: ''
>>
>> Prior to receiving this error, I was receiving a Type Mismatch on
>> this (error was on the if statement):
>> ------------------------------------------- IF REQUEST("FRMfNAME") =
>> "" THEN <-- Error line
>>  RESPONSE.WRITE "TEST"
>> 'response.write "This is username" & request("frmFName")
>> response.End()
>> END IF
>> -------------------------------------------
>>
>> If you could provide any assistance, that would be great seems very
>> strange especially considering when I put the form in a page by
>> itself, it worked fine retrieving the variables. 
>>
>>
><long signature snipped - hint it should be two dashes a space and a
> carrige return followed by at most three lines of text>
>
><snip HTML - please do not post to Usenet in HTML - always use plain
> text>
>
> I know that some people recommend using an abbreviation of the type of
> field and appending the field name to it, but I think it's extra work
> and rather silly.  If you name your fields the same as fields in your
> db, you'll be a lot happier.
>
> What happens when you loop through the request.form object?
>
><% For ix = 1 to Request.Form.Count
>     fieldName = Request.Form.Key(ix)
>     fieldValue = Request.Form.Item(ix)
>     response.write fieldname & "=" & fieldvalue
> Next
> %>
>
> Are you sure that anything was posted?
>

> Tried adding your code and received the same message:
>
> Microsoft VBScript runtime error '800a01a8'
> Object required: ''
>
> Any other thoughts???  Very strange - I consider myself a decent
> programmer but this has me STUCK!
>

<snip signature again - please fix your signature - see above>

Did you remove (or comment out) everything BUT the code I put for you?

Make a simple form that posts to itself, maybe two or three fields, and
put that code at the top, eg:

<%
option explicit
dim ix, fieldname, fieldvalue, i
dim defaultarr
dim field1, field2, field3, field4

if request.servervariables("REQUEST_METHOD") = "POST" then
        For ix = 1 to Request.Form.Count
             fieldName = Request.Form.Key(ix)
             fieldValue = Request.Form.Item(ix)
             response.write fieldname & "=" & fieldvalue & "<br>"
         Next
else
        defaultarr = array("how","now","brown","cow")
        field0 = defaultarr(0)
        field1 = defaultarr(1)
        field2 = defaultarr(2)
        field3 = defaultarr(3)
end if
%>
<html>
<head>
<title>Why the F--- Isn't This Working!!!</title>
</head>
<body>
<form method="post" action="<%=request.servervariables
("SCRIPT_NAME")%>">
<% for i = 0 to ubound(defaultarr)%>
<label for="field<%=i%>">Field<%=i%>: </label>
<input type="text" name="field<%=i%>" id="field<%=i%>" value="field<%
=i%>"><br>
<% next%>
<input type="submit" value="submit">
</form>
</body>
</html>


If that doesn't work, then maybe there is something else at fault. 
Check spellings of things, etc.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Author
8 Jul 2009 9:37 AM
Daniel Crichton
"Shawn Ferguson" <SFerg***@cscc.edu> wrote in message news:4A532762.48BE.0071.0@cscc.edu...
I have a very weird problem.  I have a form that post to an ASP page, when I
try to retrieve those values from the form using this:
-------------------------------------------
myField = request.form("frmFname") <-- Error line
response.write "This is a test " & myField
-------------------------------------------
I receive an error :

Microsoft VBScript runtime error '800a01a8'
Object required: ''

Prior to receiving this error, I was receiving a Type Mismatch on this
(error was on the if statement):
-------------------------------------------
IF REQUEST("FRMfNAME") = "" THEN <-- Error line
RESPONSE.WRITE "TEST"
'response.write "This is username" & request("frmFName")
response.End()
END IF
-------------------------------------------

If you could provide any assistance, that would be great seems very strange
especially considering when I put the form in a page by itself, it worked
fine retrieving the variables.




Have you got any functions defined anywhere, either in the same ASP page or
in an included page? Have you inadvertently named a function Request?

And to reiterate what Adrienne has already asked, please don't use HTML/RTF
in newsgroup posts.

--
Dan
Author
9 Jul 2009 8:58 PM
Shawn Ferguson
Wanted to thank you for helping me solve my problem.  What happen was we
integrated some code from a merchant account vendor, seems as if they
created a field called "request"  - which as we know is a reserved
word(object), therefore, it was giving me that error.  So thank you both
Adrienne and Daniel, your time and help was valuable and I appreciate it
very much!

Shawn M. Ferguson
Supervisor of Information Services
sferg***@cscc.edu
1(800)621-6407
(614) 287-2502 Voice
(614) 287-5488 FAX

Bookmark and Share