Very strange - ASP page called twice from Netscape

Discussion in 'ASP General' started by Moshe, Jul 16, 2003.

  1. Moshe

    Moshe Guest

    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
     
    Moshe, Jul 16, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samy
    Replies:
    2
    Views:
    1,393
  2. Raymond Arthur St. Marie II of III

    very Very VERY dumb Question About The new Set( ) 's

    Raymond Arthur St. Marie II of III, Jul 23, 2003, in forum: Python
    Replies:
    4
    Views:
    510
    Raymond Hettinger
    Jul 27, 2003
  3. shanx__=|;-

    very very very long integer

    shanx__=|;-, Oct 16, 2004, in forum: C Programming
    Replies:
    19
    Views:
    1,704
    Merrill & Michele
    Oct 19, 2004
  4. Abhishek Jha

    very very very long integer

    Abhishek Jha, Oct 16, 2004, in forum: C Programming
    Replies:
    4
    Views:
    456
    jacob navia
    Oct 17, 2004
  5. Peter

    Very very very basic question

    Peter, Feb 8, 2005, in forum: C Programming
    Replies:
    14
    Views:
    534
    Dave Thompson
    Feb 14, 2005
Loading...

Share This Page