473,491 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Request(var) empty - stumped

1 New Member
Hi,

Just switched to a new server, code work fine for 2 years, now on Win2003sp2, OK in IE6, Firefox, but ONLY 1 of 2 IE7's. One works, one doesn't. Fussed for a long time - boils down to this- I seem to get empty request variables from the user:
Expand|Select|Wrap|Line Numbers
  1. html (one of several variations):
  2. <html>
  3. <body>
  4. <form action="formsget.asp" method="post">
  5. <input type="text" name="username">User Name<br>
  6.  
  7. <input type="submit" value="submit" >
  8. </form>
  9. </body>
  10. </html>
  11.  
  12.  
  13. ASp:
  14.  
  15.  
  16. f
  17. <%response.write request.form%>
  18. <hr>
  19.  
  20. qs
  21. <%response.write request.querystring%>
  22. <hr>
  23.  
  24. u
  25. <%response.write request("username")%>
  26. <hr>
  27. p
  28. <%response.write request("password")%>
  29. <hr>
  30. u
  31. <%response.write request.form("username")%>
  32. <hr>
  33. p
  34. <%response.write request.form("password")%>
  35. <hr>
  36.  

I'm totally stumped - any help MUCH appreciated.
Aug 20 '07 #1
3 2389
ilearneditonline
130 Recognized Expert New Member
Can you post the original code that was working? Or at least a bit more that what you have. What you have looks ok, and I have been running classic ASP apps running on Win2003K for some time now.
Aug 20 '07 #2
jhardman
3,406 Recognized Expert Specialist
One thing I try sometimes is write a list of all the data that comes from the user:
Expand|Select|Wrap|Line Numbers
  1. for each x in request.form
  2.    response.write x & ": " & request.form(x) & "<br>" & vbNewLine
  3. next
  4.  
  5. for each x in request.querystring
  6.    response.write x & ": " & request.querystring(x) & "<br>" & vbNewLine
  7. next
  8.  
  9. for each x in request.serverVariables
  10.    response.write x & ": " & request.serverVariables(x) & "<br>" & vbNewLine
  11. next
  12.  
  13. for each x in request.cookies
  14.    response.write x & ": " & request.cookies(x) & "<br>" & vbNewLine
  15. next
of course you usually know when you set a cookie, so that part probably doesn't apply, and the only useful thing in serverVariables that applies to form data is the session ID. If you just ask for request.form("userID") and nothing was sent, it will return a blank. My method won't give you anything if nothing was sent, but it will give you a blank if the form was sent but it is missing that input.

Jared
Aug 21 '07 #3
ilearneditonline
130 Recognized Expert New Member
One thing I try sometimes is write a list of all the data that comes from the user:
Expand|Select|Wrap|Line Numbers
  1. for each x in request.form
  2. response.write x & ": " & request.form(x) & "<br>" & vbNewLine
  3. next
  4.  
  5. for each x in request.querystring
  6. response.write x & ": " & request.querystring(x) & "<br>" & vbNewLine
  7. next
  8.  
  9. for each x in request.serverVariables
  10. response.write x & ": " & request.serverVariables(x) & "<br>" & vbNewLine
  11. next
  12.  
  13. for each x in request.cookies
  14. response.write x & ": " & request.cookies(x) & "<br>" & vbNewLine
  15. next
of course you usually know when you set a cookie, so that part probably doesn't apply, and the only useful thing in serverVariables that applies to form data is the session ID. If you just ask for request.form("userID") and nothing was sent, it will return a blank. My method won't give you anything if nothing was sent, but it will give you a blank if the form was sent but it is missing that input.

Jared
Great suggestion. I never thought of doing that myself. I always check for a specific element. That can be a real pain of you have alot of them.
Aug 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
3113
by: Robert Mark Bram | last post by:
Hi All! I have checked Windows Script help for the Undefined Data Type. It says I should be able to do this: // This method will work if (typeof(x) == "undefined") // do something However,...
1
1589
by: bitTwideler | last post by:
I have a page with several input items with the same name (an array). In clasic asp, I can tell how many items there are with Request("var").count, but .net seems to have done away with this...
9
2360
by: balakrishnan.dinesh | last post by:
hi friends, Exactly what i want to know is, In my product we are using xmlhttp request to retrive some data from the server, And Im using IE browser, its working fine in IE. Now i want to work...
5
20044
by: dougwig | last post by:
I'm trying to handle the scenario where a user's session times out and and their ajax request triggers a redirection by the webserver (302 error?). I'm using Prototype 1.4 and the my works great...
7
9637
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string...
1
1965
by: pritisolank | last post by:
Hello Everyone, With that alert statment alert("calling validateme for "+document.form1.elements); in js things would work fine but if i remoe the form is simply getting submitted in firebug i can...
6
4955
by: santhoskumara | last post by:
How to request to servlet from Ajax and also I got the DOM object in the servlet through Business Logic. Now how will i pass the DOM object from serlvet to Clientside. Where in the client Side i am...
2
5485
by: Doogie | last post by:
Hi, I'm writing Javascript code to parse out a query string. I want to handle the case where a parameter value may not be sent. So consider a parameter called "State". If the user doesn't pass...
10
2759
by: mouac01 | last post by:
My site uses lots of AJAX requests to PHP files which then retrieves data from MySQL. About 95% of the time the requests complete without issues. Every once in a while a request will hang for...
0
7118
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
7192
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...
1
6862
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
7364
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5452
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,...
1
4886
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...
0
3087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.