Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP working in IE6 fails in IE7

Status
Not open for further replies.

ArferMo

Programmer
Mar 11, 2005
8
0
0
GB
I have a problem with an ASP page that fails after a certain number of Response.Redirect calls to itself but only in IE7.

The web page (on an intranet site) is calles runreports.asp

This page runs, querys an MSSQL database and then calls itself again using the CustomerID found from the query return. This is the line that calls again.

Response.Redirect ("runreports.asp?CustomerID=" & CustomerID & "&CustomerNo=" & CustomerNo & "")

If run from IE6 it goes through about 150 loops to completion every time.

If it is run from IE7 every time CustomerID gets to 63 it fails.

This is the last good call under IE7
Response.Redirect ("runreports.asp?CustomerID=62&CustomerNo=

This line generated by the software fails
Response.Redirect ("runreports.asp?CustomerID=63&CustomerNo=

The strange thing is that if I enter this
Response.Redirect ("runreports.asp?CustomerID=63&CustomerNo=
in to the browser address line it works and also for any number greater than 63 but why.

Its almost like the variable CustomerID exceeds its maximum value.

CcustomerID is populated from the SQL query

query2 = "select CustomerID, FROM Customers WHERE LastEmail IS NOT NULL " & CustomerIDstring & " order by CustomerID"

set compact2 = connect.execute(query2)

CustomerID = trim(compact2("CustomerID"))


So the question is... why ok in IE6 and fails in IE7 and how to fix.
 
Since the browser never sees the ASP scripting, the issue has to be with the code being delivered by the server.

You also need to define what you mean by
This line generated by the software fails
What happens or doesn't happen?

Lee
 
As the page has nothing to render until completion it just gives an unable to load page error under IE7. If I put a trap in before the line that starts Response.Redirect....

If CustomerID >= 61 then
Response.Write query2
Response.End
End If

Response.Redirect ("runreports.asp?CustomerID=" & CustomerID & "&CustomerNo=" & CustomerNo & "")

Then this will cause the page to render and I can see the content of query2 for example.
 
Try
Code:
If CustomerID >= 61 then
    Response.Write CustomerID & Chr(13) & Chr(10) & Customer No
    Response.Flush
End If
[code]

The Flush sends the HTML to that point to the browser without ending the script.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top