Very strange - ASP page called twice from Netscape

M

Moshe

Page with a <form> action calls ASP page.
The ASP page has the following structure
<%@ LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<% Option Explicit %>
<% Server.ScriptTimeOut=100
With Response
.Buffer = True
.Expires = 0
.Clear
End With
' *************************** Implementation code ******************
'*****Intialize session var if needed and local vars
%>
<!--#include Virtual="Include/HtmlHeader_inc.asp"-->
-- some more includes --
<%
' *************************** Functions ******************
Class FECR
-- Here I have the class definition with properties and methods
end class
<%
' *************************** Dimension var ******************
dim Method 'Holds the method
dim CourseNumber 'Holds the course number to add to the registration
in "ADD"
dim URL 'Hold the URL to return to
dim oFE 'Instance of the Frontend Object
dim iResponse, sMessage, sColor
dim bResult
%>
<%
' *************************** Start code ******************
Method = ucase(Request("method"))
set oFE = new FECR
oFE.ConnectionString = Application("SiteConnection")
oFE.RegistrationID = session("RegistrationID")
if oFE.RegistrationID <> 0 then
oFE.Load
end if
if request.form("URL")<>"" then
URL = request.form("URL")
session("URL") = URL
elseif session("URL") <> "" then
URL = session("URL")
end if
CourseNumber = Request("coursenumber")
case "ADD"
'Add the new course to the list
if CourseNumber = "" then
oFE.LastError = "Course Number cannot be blank"
'response.Redirect("http://localhost/"&URL)
else
bResult = ofe.Add(CourseNumber)
end if
case "CONTINUE"
if oFE.LastError = "" then
bResult = oFE.Save()
end if
response.Redirect("http://mysite/" & URL)
case "CHECKOUT"
'Save data to database and Proceed to check out
if oFE.LastError = "" then
bResult = oFE.Save()
end if
-- More code in here --
oFE.RegistrationID = 0
session("RegistrationID") = 0
Response.End
case "DELETE"
'Delete the whole registration and start over. Will loose all data
if oFE.RegistrationID <> 0 then
bResult = oFE.DeleteCourseRegistration
session("RegistrationID")=0
end if
response.Redirect("http://mysite/" & URL)
end select
session("RegistrationID") = oFE.RegistrationID
%>
<!-- Client functions -->
<!------------------------------------------ Validation
------------------------------>
<script language="javascript">
<!--
.... continue with HTML code

Everything is working prefectly with IE.
With Netscape I have a very strange behavior.
Sometimes (couldn't find when) when the ASP page is called with ADD
method, the ASP page works fine, creates a new record in a database to
save the information, creates a session var to save the new record ID
and then send the HTML to the browser that shows the page created by
the ASP as needed and sometimes the ASP finishes and is called right a
way again without the client browser showing anything. Then it runs
through the ASP code again and send a page to client.
Any idea?
Is there something in header that ASP generates that triggers Netscape
to submit back right away without displaying anything?
Is something with buffering and timeout?
Thanks
myalo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,832
Latest member
UtaHetrick

Latest Threads

Top