Forum Moderators: open

Message Too Old, No Replies

IE6 and forms

Forms not working on PC's with IE6

         

yeltomw

8:04 pm on Mar 27, 2002 (gmt 0)



Hi, I have an Intranet site that uses a login form. We are installing new PC's with win2k and IE6. On all of the new systems the forms do not work. It looks like the form data is not being passed on to the verify page. I have enabled session cookies manually to see if this would help but to no avail. Any help would be appreciated.

korkus2000

8:06 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you post the form. I work with the same set up on an intranet.

yeltomw

9:45 pm on Mar 27, 2002 (gmt 0)



Here is the HTML for the Login form. The second section is the verify page
<table border="0" cellpadding="5" cellspacing="0" width="98%" bgcolor="#C0C0C0" style="border-style: solid; border-width: 2">
<tr>
<td width="100%" colspan="2" bgcolor="#000080"><font color="#FFFFFF">Please
enter your username and password</font></td>
</tr>
<tr>
<td width="91%">User Name</td>
<td width="50%"><input type="text" name="username" size="20"></td>
</tr>
<tr>
<td width="91%">Password</td>
<td width="50%"><input type="password" name="password" size="20"></td>
</tr>
<tr>
<td width="100%" colspan="2">
Click to Change User Information     <input type="checkbox" name="Cbox_change" value="ON">
</td>
</tr>
<tr>
<td width="100%" colspan="2">
<p align="center"><br>
<input type="submit" value="Login Now" name="B1"></p>
</td>
</tr>
</table>
</center>
</div>
</form>
</table>

Verify Script


<%

' Create a command object. This object serves to run our queries

Set Cm = Server.CreateObject("ADODB.Command")

' Specify the system DSN path

Cm.ActiveConnection = "LOGINDSN_SQL"

' Now it's time for the query. We need to check the user information
' against the table tUsers

Cm.CommandText = "SELECT * FROM tUsers WHERE " & _
"UserName='" & Request.Form("UserName") & "' AND " & _
"UserPassword='" & Request.Form("Password") & "' "

' Set the query type. 1 means it is a SQL statement

Cm.CommandType = 1

' Retrieve the results in a recordset object

Set Rs = Cm.Execute

' We now check if the user is valid. If user is valid, the recordset MUST
' haverecord. Otherwise it is empty. If user exists, we set authentication
' status to 1 and send the user to appropriate page, say welcome.asp.
' Else send the user back to login.asp

If Rs.EOF Then
Session("Authenticated") = 0
'Response.Redirect ("login.asp")
msg = "Incorrect username or password. <br> Please Click back on your browser and try again"

Else
Session("Username") = Request.form("username")
Session("Password") = Request.form("password")
Session("Authenticated") = 1
Session("User_Level") = Rs("User_Level")
'Response.Write Session("Username")
'Response.Write Session("User_level")

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Update the User table add 1 to visit count and Punch Timestamp
Cm.CommandText = "Update tUsers " & _
"Set Last_Access='" & Now()& "' ," & _
"Visits = Visits + 1 Where Username='"&Session("Username")&"'"

' Set the query type. 1 means it is a SQL statement

Cm.CommandType = 1

' Retrieve the results in a recordset object

Set Rs = Cm.Execute
End If

if request.form("Cbox_change")= "ON" then
dim username, password
username = Request.Form("UserName")
password = Request.Form("Password")
response.redirect("returnuserinfo.asp")
else
Response.Redirect ("default.asp")
end if

%>

<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="365" height="200">
<tr>
<td width="365" height="200" align="center"><% Response.Write msg%>
</td>
</tr>
</table>
</center>
</div>

korkus2000

10:22 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



what does your form tag say. Are you using post as your method?
are you in atlanta?

brotherhood of LAN

10:25 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi,

Ive been switching back and forth with IE versions, I believe the latest version doesnt allow you to press enter to execute a form, and that you rather have to press the submit button or something similar. Thats the only difference ive noticed, even it is applicable. Apart from that, your problem may be another factor and not IE6

yeltomw

2:16 pm on Mar 28, 2002 (gmt 0)



My form method is post. I have also changed the URL to explicit rather than relative hoping that may have something to do with it. Yes I am in the ATL area, Lawrenceville.

korkus2000

2:19 pm on Mar 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Im in marietta. What happens exactly when you try to submit. Does it go to your invalid log in page?

yeltomw

2:27 pm on Mar 28, 2002 (gmt 0)



I see opening verify.asp on the message bar for a moment but the page does not go anywhere. I also a change user info checkbox in the form as well. When I check this box the retrurnuserinfo page displays but displays the EOF and BOF message. It seems as though the form values are not being captured or passed to other pages.

korkus2000

2:48 pm on Mar 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



what is your security code at the top of your secured pages?

yeltomw

2:59 pm on Mar 28, 2002 (gmt 0)



<%
If Session("Authenticated") = 0 Then
Response.Redirect ("Login.asp")
End If
%>

yeltomw

3:00 pm on Mar 28, 2002 (gmt 0)



<%
If Session("Authenticated") = 0 Then
Response.Redirect ("Login.asp")
End If
%>

korkus2000

3:45 pm on Mar 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



try submiting to a page that just writes your passed info (username, password).

I feel like its a problem with

a. your query
b. your dsn

have you had it work before?
It has to be a database problem.

pageoneresults

4:15 pm on Mar 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm going to ask a rather rudimentary question; Where is the beginning <form> tag? It does not show above in your code and I'm thinking you left it out on purpose or maybe its not there? I see the ending tag but not the starting one.

Another off the wall question. Are you using FP2002 to design the forms? If so, there are some issues with FP2002 and forms. If the tags are not nested properly, the forms won't work.

yeltomw

4:20 pm on Mar 28, 2002 (gmt 0)



I made an error on the posting. Here is the acutual code which is nested in a table. I am using FP2K as a dev tool.

<table width="291" bgcolor="#C0C0C0" border="1">
<form method="Post" action="http://ghs_corvu/verify.asp">
<td width="283"> 
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0" width="98%" bgcolor="#C0C0C0" style="border-style: solid; border-width: 2">
<tr>
<td width="100%" colspan="2" bgcolor="#000080"><font color="#FFFFFF">Please
enter your username and password</font></td>
</tr>
<tr>
<td width="91%">User Name</td>
<td width="50%"><input type="text" name="username" size="20"></td>
</tr>
<tr>
<td width="91%">Password</td>
<td width="50%"><input type="password" name="password" size="20"></td>
</tr>
<tr>
<td width="100%" colspan="2">
Click to Change User Information     <input type="checkbox" name="Cbox_change" value="ON">
</td>
</tr>
<tr>
<td width="100%" colspan="2">
<p align="center"><br>
<input type="submit" value="Login Now" name="B1"></p>
</td>
</tr>
</table>
</center>
</div>
</form>
</table>

yeltomw

4:21 pm on Mar 28, 2002 (gmt 0)



This works as expected on PC's without IE6

pageoneresults

4:29 pm on Mar 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Try experimenting with the placement of the beginning <form> tag. I've had similar problems and they were solved by moving the beginning and ending <form> tags. Your is current nested here...

<table width="291" bgcolor="#C0C0C0" border="1">
<form method="Post" action="http://ghs_corvu/verify.asp">
<td width="283">
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0" width="98%" bgcolor="#C0C0C0" style="border-style: solid; border-width: 2">

Try moving it down to the next table...

<table width="291" bgcolor="#C0C0C0" border="1">
<td width="283">
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0" width="98%" bgcolor="#C0C0C0" style="border-style: solid; border-width: 2">
<form method="Post" action="http://ghs_corvu/verify.asp">

As soon as I upgraded to FP2002 a few months back, I started to have some problems with forms. After viewing the source code of those pages I realized that FP was adding the closing </form> tag right after the opening <form> tag and this had to do with nesting.

I'm not sure if it will solve the problem, but it may be a start. It solved mine!

P.S. Just ig me if I'm totally of course here!

yeltomw

5:26 pm on Mar 28, 2002 (gmt 0)



pageoneresults, I tried the suggestion but it is still a no go.

korkus2000

6:09 pm on Mar 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your code is fine. I think the problem is your front page. I have never used front page. If you are using themes and have the extensions loaded then some freaky stuff can happen. View the source of the login page. See what is going on. Thats all I can really tell you.

tedster

8:41 pm on Mar 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, try popping the whole containing table inside the form tags:

<form>
<table></table>
</form>

Strictly speaking, no element should come between a table tag and its following table row and table cell tags. Form tags should be completely contained inside the <td></td> or outside the <table></table>.

yeltomw

2:42 pm on Apr 1, 2002 (gmt 0)



Resloved!!
I have uninstalled (reverted to previous version 5.5) and then reinstalled 6.0 on several PC's and now the forms are working as expected. You may want to leave your systems at 5.5 until MS acknowledges the problems and puts out a new version. Note: These PC's were originally setup with an image created using Sysprep and Norton Ghost.