Header Error

Results 1 to 2 of 2

Thread: Header Error

  1. #1
    Join Date
    Dec 1969

    Default Header Error

    Hi Folks, <BR><BR>I am trying to create an "Order Processing" page on my e-commerce site that the customer sees after they click the Process Order button from the shopping cart, but before they receive their confirmation receipt page. Its basically a simple page that tells the customer that their order is processing and to wait a moment. Fandango.com is an example: https://www.fandango.com/ticket_box_office_conf.asp <BR><BR>Form variables with the customer info are passed from Page1.asp to Page2.asp. Page2.asp should show the "Order Processing" graphic, as well as process the order and then response.redirect to Page3.asp, which is the receipt page. See sample code below: <BR><BR>PAGE1.ASP <BR><BR>&#060;FORM ACTION="Page2.asp" METHOD="post"&#062; <BR> ... <BR>&#060;/FORM&#062; <BR><BR><BR>PAGE2.ASP <BR><BR>&#060;% <BR>ProcessCreditCard() <BR><BR>If CreditCard = "valid" Then <BR> insert into DB <BR> Response.Redirect("Page3.asp") <BR>End If <BR>%&#062; <BR>&#060;HTML&#062;&#060;BODY&#062; <BR>&#060;IMG SRC="OrderProcessingGraphic.jpg"&#062; <BR>&#060;/BODY&#062;&#060;/HTML&#062; <BR><BR><BR>PAGE3.ASP <BR><BR>&#060;HTML&#062; <BR> Order Receipt <BR>&#060;/HTML&#062; <BR><BR><BR>The problem is that the HTML on Page2.asp does not display during the few seconds that is takes for the credit card to authorize. It just redirects to Page3.asp, so it looks like you are going straight from Page1.asp to Page3.asp. If I put the Response.Redirect below the HTML, I get a Header Error. <BR><BR>How do I get the HTML on Page2.asp to display before it redirects? <BR><BR>Thanks in advance for your help!!!

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category The Nature of Things

    Click on link to ASPFAQs above.<BR><BR>Click on category given.<BR><BR>Find your FAQ.<BR><BR>Short answer: As I told you in the other thread, you can NOT *both* have HTML output *and* do Response.Redirect. And that&#039;s an HTTP limitation, not an ASP limitation.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts