473,395 Members | 1,452 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,395 software developers and data experts.

internet explorer cannot read post data from form

Hello, I hope this is the right place to post, but anyways, here goes. I current have a forum, snitz, in place, but am having an IE specific problem. Basically what happens is, I have a page that drops a cookie which logs in the user. This all works fine, but once the cookie is dropped ALL post method data from forms become empty. Get works, and if I post data to a different site it works, so the break down is reading the data from the post. Here is the code that logs the user into the site:

<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_func_common.asp"-->
<%
dim rsUser, conn

if len(Mid(Request.ServerVariables("AUTH_USER"), Instr(1, Request.ServerVariables("AUTH_USER"), "\") + 1)) > 0 and not strLoginStatus = 1 then
set conn = Server.CreateObject("ADODB.CONNECTION")
set rsUser = Server.CreateObject("ADODB.RECORDSET")

conn.Open strConnString

rsUser.Open "SELECT m.M_PASSWORD FROM glbPermissions p INNER JOIN FORUM_MEMBERS m ON p.id = m.M_FITS_ID WHERE p.loginName='" & lcase(Mid(Request.ServerVariables("AUTH_USER"), Instr(1, Request.ServerVariables("AUTH_USER"), "\") + 1)) & "'", conn

if not rsUser.EOF then
strDBNTUserName=trim(Mid(Request.ServerVariables(" AUTH_USER"), Instr(1, Request.ServerVariables("AUTH_USER"), "\") + 1))
strEncodedPassword = rsUser("M_PASSWORD")

if strSetCookieToForum = 1 then
Response.Cookies(strUniqueID & "User").Path = strCookieURL
else
Response.Cookies(strUniqueID & "User").Path = "/"
end if
Response.Cookies(strUniqueID & "User")("Name") = strDBNTUserName
Response.Cookies(strUniqueID & "User")("Pword") = strEncodedPassword
'Response.Cookies(strUniqueID & "User")("Cookies") = Request.Form("Cookies")
if fSavePassWord = "true" then
Response.Cookies(strUniqueID & "User").Expires = dateAdd("d", intCookieDuration, strForumTimeAdjust)
end if
Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTFUserName)

strLoginStatus = 1
end if

rsUser.Close

conn.Close
end if

if Len(Request.QueryString("target")) > 0 then
Response.Redirect "login.asp?" & Request.QueryString("target")
else
Response.Redirect "default.asp"
end if
%>

All the previous code does is create the cookies. The variables are declared on one of the included pages. Once this code is executed, nothing works. I have created a simple asp page that just reads posted data which does not work once I use the above page:

<html>
<head>
</head>
<body>
<%=Request("test")%>

<form method="post" action="test.asp">
<input type="text" name="test" />
<input type="submit" value="submit" />
</form>
</body>
</html>

Before I log in, the above code will echo everything in the box, but after I log in, it receives nothing. I have tested this log in feature on firefox, and it works fine, but on ie, it just refuses to work. Hopefully someone can shed some insight onto this, because I've been at this for 2 days, and have made no progress.
Oct 18 '07 #1
1 2215
markrawlingson
346 Expert 100+
The request object is a tricky thing because it refers to more than 1 collection. Generally it's a good idea to specify exactly which collection you're requesting information from instead of just using Request("test") - this could mean it's coming from cookies, the qstring, or the form - and ASP doesn't know which. It just looks for the first cookie, querystring value, or form value named "test"

Try specifying Request.Form("test") and see if that solves the problem.

I'm wondering whether or not you messed around with cookies before you wrote this script.. for instance, did you write a simple script to play around with cookies on your computer? And if so, did you set the name of that cookie to "test"... Because that would make a whole lot of sense :P

I also noticed that when you pass people to login.asp there's a small problem...

Expand|Select|Wrap|Line Numbers
  1. if Len(Request.QueryString("target")) > 0 then
  2. Response.Redirect "login.asp?" & Request.QueryString("target")
  3. else
  4. Response.Redirect "default.asp"
  5. end if
  6.  
The querystring value of "target" is passed along to the next page but it doesn't have an identifer, so if you tried to say... Request.QueryString("target") on the next page it would return null.

Expand|Select|Wrap|Line Numbers
  1. if Len(Request.QueryString("target")) > 0 then
  2. Response.Redirect "login.asp?target=" & Request.QueryString("target")
  3. else
  4. Response.Redirect "default.asp"
  5. end if
  6.  
Sincerely,
Mark
Oct 18 '07 #2

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

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
3
by: Craig | last post by:
Is there a way to access the internet explorer DOM in ASP.NET? Thanks
1
by: Apu Nahasapeemapetilon | last post by:
Hello and thank you in advance for your help. Can anyone think of a reason why this code would work properly on one PC, but not another? I've got a System.Windows.Forms.UserControl that...
4
by: =?Utf-8?B?QUcxNTYy?= | last post by:
I am using Internet Explorer 7 and if I try to view a video (YouTube or similar) I get a messgage saying that I have either an outdated version of Macromedia Flask or Java is turned off. Java is...
9
by: Etayki | last post by:
Hi! I am new to VB.net and I am using the Visual Basic 2005 Express Edition I have two questions: 1. I am trying to write an application that will automate Internet Explorer and store data...
28
by: Neo Geshel | last post by:
NOTE: PAST EXPERIENCE HAS SHOWN ME THAT MANY ON USENET FAIL TO READ ARTICLES PROPERLY PRIOR TO ANSWERING. I AM LOOKING FOR VERY SPECIFIC INFORMATION, THEREFORE PLEASE READ AND UNDERSTAND...
0
by: =?Utf-8?B?Sm9obmF0aGFuS29uZw==?= | last post by:
Hello, I hope this is the right place to post, but anyways, here goes. I current have a forum, snitz, in place, but am having an IE specific problem. Basically what happens is, I have a page that...
4
by: eschneider | last post by:
I get the following error when trying to browse the .asmx. I get the same thing when trying to add a reference. using .NET 2.0 There is no error message. Any ideas? Thanks,
2
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...

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.