|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Weird Problem------------------------------------------- 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 Gazing into my crystal ball I observed "Shawn Ferguson"
Show quoteHide quote <SFerg***@cscc.edu> writing in news:4A532762.48BE.0071.0@cscc.edu: <long signature snipped - hint it should be two dashes a space and a > 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. > > 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 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: <long signature snipped - hint it should be two dashes a space and a > 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. > > 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 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 >>> <snip signature again - please fix your signature - see above>> 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! > 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>" Nextelse 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 "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 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
ASP Classic - Alphabetical lists
Paging with ASP Classic Large row count from stored procedure Urgent: getting recordcount after running Stored Procedure LEFT JOIN problem Script from variables Session object value not displaying Open Excel File Cannot use parentheses when calling a Sub Detect Connection to DB |
|||||||||||||||||||||||