problem with response.redirect 
Author Message
 problem with response.redirect

problem with response.redirect

i creat a web form (htm file) who submit to an ASP vbs page.
this is my asp page code. here:


<%
dim erreur
erreur=0

if Request.Form ("titre_du_document")="" then erreur=1
if Request.Form ("demandeur")="" then erreur=1
if Request.Form ("telephone")="" then erreur=1
if Request.Form ("PROVENANCE")="" then erreur=1
if Request.Form ("unite_administrative")="" then erreur=1
if Request.Form ("personne_ressource")="" then erreur=1
if Request.Form ("delai_de_livraison")="" then erreur=1
if Request.Form ("date")="" then erreur=1

response.write erreur

if erreur=1 then Response.Redirect("incorrect.htm")

%>

<HTML>
<HEAD>
</HEAD>
<BODY>
</BODY>
</HTML>

and then this error occur ==>

Response object error 'ASP 0156 : 80004005'

Header Error

/communications/traduction/facteur.asp, line 23

The HTTP headers are already written to the client browser. Any HTTP
header modifications must be made before writing page content.

can someone help ?
Thank



Sun, 09 Feb 2003 03:00:00 GMT  
 problem with response.redirect

at the following:
    <% Response.Buffer = TRUE %>
under:

Regards,
--
Richard Cook
NetData4 Corp.
http://www.netdata4.net
Tel: 807-623-1456     Fax: 807-622-9861
Fast, reliable web hosting and development.
--
t b S E L L . C O M
Sell your new or used unwanted items.
http://www.tbsell.com
--


Quote:
> problem with response.redirect

> i creat a web form (htm file) who submit to an ASP vbs page.
> this is my asp page code. here:


> <%
> dim erreur
> erreur=0

> if Request.Form ("titre_du_document")="" then erreur=1
> if Request.Form ("demandeur")="" then erreur=1
> if Request.Form ("telephone")="" then erreur=1
> if Request.Form ("PROVENANCE")="" then erreur=1
> if Request.Form ("unite_administrative")="" then erreur=1
> if Request.Form ("personne_ressource")="" then erreur=1
> if Request.Form ("delai_de_livraison")="" then erreur=1
> if Request.Form ("date")="" then erreur=1

> response.write erreur

> if erreur=1 then Response.Redirect("incorrect.htm")

> %>

> <HTML>
> <HEAD>
> </HEAD>
> <BODY>
> </BODY>
> </HTML>

> and then this error occur ==>

> Response object error 'ASP 0156 : 80004005'

> Header Error

> /communications/traduction/facteur.asp, line 23

> The HTTP headers are already written to the client browser. Any HTTP
> header modifications must be made before writing page content.

> can someone help ?
> Thank



Sun, 09 Feb 2003 03:00:00 GMT  
 problem with response.redirect
The error code you are seeing means that you have already written something
to the client (browser), in your case:
    response.write erreur

If you remove that line the response.redirect should work fine.

Luke


Quote:
> problem with response.redirect

> i creat a web form (htm file) who submit to an ASP vbs page.
> this is my asp page code. here:


> <%
> dim erreur
> erreur=0

> if Request.Form ("titre_du_document")="" then erreur=1
> if Request.Form ("demandeur")="" then erreur=1
> if Request.Form ("telephone")="" then erreur=1
> if Request.Form ("PROVENANCE")="" then erreur=1
> if Request.Form ("unite_administrative")="" then erreur=1
> if Request.Form ("personne_ressource")="" then erreur=1
> if Request.Form ("delai_de_livraison")="" then erreur=1
> if Request.Form ("date")="" then erreur=1

> response.write erreur

> if erreur=1 then Response.Redirect("incorrect.htm")

> %>

> <HTML>
> <HEAD>
> </HEAD>
> <BODY>
> </BODY>
> </HTML>

> and then this error occur ==>

> Response object error 'ASP 0156 : 80004005'

> Header Error

> /communications/traduction/facteur.asp, line 23

> The HTTP headers are already written to the client browser. Any HTTP
> header modifications must be made before writing page content.

> can someone help ?
> Thank



Sun, 09 Feb 2003 03:00:00 GMT  
 problem with response.redirect
already try that and no luck !
Quote:

> The error code you are seeing means that you have already written something
> to the client (browser), in your case:
>     response.write erreur

> If you remove that line the response.redirect should work fine.

> Luke



> > problem with response.redirect

> > i creat a web form (htm file) who submit to an ASP vbs page.
> > this is my asp page code. here:


> > <%
> > dim erreur
> > erreur=0

> > if Request.Form ("titre_du_document")="" then erreur=1
> > if Request.Form ("demandeur")="" then erreur=1
> > if Request.Form ("telephone")="" then erreur=1
> > if Request.Form ("PROVENANCE")="" then erreur=1
> > if Request.Form ("unite_administrative")="" then erreur=1
> > if Request.Form ("personne_ressource")="" then erreur=1
> > if Request.Form ("delai_de_livraison")="" then erreur=1
> > if Request.Form ("date")="" then erreur=1

> > response.write erreur

> > if erreur=1 then Response.Redirect("incorrect.htm")

> > %>

> > <HTML>
> > <HEAD>
> > </HEAD>
> > <BODY>
> > </BODY>
> > </HTML>

> > and then this error occur ==>

> > Response object error 'ASP 0156 : 80004005'

> > Header Error

> > /communications/traduction/facteur.asp, line 23

> > The HTTP headers are already written to the client browser. Any HTTP
> > header modifications must be made before writing page content.

> > can someone help ?
> > Thank



Sun, 09 Feb 2003 03:00:00 GMT  
 problem with response.redirect
Hey, thanks a lot !
It work now !!!!!!!!!
Quote:

> at the following:
>     <% Response.Buffer = TRUE %>
> under:

> Regards,
> --
> Richard Cook
> NetData4 Corp.
> http://www.netdata4.net
> Tel: 807-623-1456     Fax: 807-622-9861
> Fast, reliable web hosting and development.
> --
> t b S E L L . C O M
> Sell your new or used unwanted items.
> http://www.tbsell.com
> --



> > problem with response.redirect

> > i creat a web form (htm file) who submit to an ASP vbs page.
> > this is my asp page code. here:


> > <%
> > dim erreur
> > erreur=0

> > if Request.Form ("titre_du_document")="" then erreur=1
> > if Request.Form ("demandeur")="" then erreur=1
> > if Request.Form ("telephone")="" then erreur=1
> > if Request.Form ("PROVENANCE")="" then erreur=1
> > if Request.Form ("unite_administrative")="" then erreur=1
> > if Request.Form ("personne_ressource")="" then erreur=1
> > if Request.Form ("delai_de_livraison")="" then erreur=1
> > if Request.Form ("date")="" then erreur=1

> > response.write erreur

> > if erreur=1 then Response.Redirect("incorrect.htm")

> > %>

> > <HTML>
> > <HEAD>
> > </HEAD>
> > <BODY>
> > </BODY>
> > </HTML>

> > and then this error occur ==>

> > Response object error 'ASP 0156 : 80004005'

> > Header Error

> > /communications/traduction/facteur.asp, line 23

> > The HTTP headers are already written to the client browser. Any HTTP
> > header modifications must be made before writing page content.

> > can someone help ?
> > Thank



Sun, 09 Feb 2003 03:00:00 GMT  
 problem with response.redirect
The problem is you're attempting to modify the headers after
the page has started to be transmitted to the client.

Once you break from the ASP script with the %> and start
doing things liks <HTML> then the server will start transmitting
data to the client.The first thing that gets transmitted is the headers.

When you do a response.redirect, this modifies the headers and
sends an HTTP 303 - Redirect to the client to go somewhere else.

Well, if you've already sent the headers (HTTP 200 - OK) how, then,
can you modify them?

Answer: You can't.

You must tell the server to wait until the whole page has been processed
before sending the client ANY information.

You can do this by setting Response.Buffer = True at the top of the page.

CAVEAT: remember, the entire page must be loaded before the client gets it,
this means that if you have a lengthy page or a time intensive page, the
client will have to sit there and wait for EVERYTHING to be processed
before they see anything appear on their site.

Be conservative using the Response.Buffer = True.

-Chad


Quote:
> problem with response.redirect

> i creat a web form (htm file) who submit to an ASP vbs page.
> this is my asp page code. here:


> <%
> dim erreur
> erreur=0

> if Request.Form ("titre_du_document")="" then erreur=1
> if Request.Form ("demandeur")="" then erreur=1
> if Request.Form ("telephone")="" then erreur=1
> if Request.Form ("PROVENANCE")="" then erreur=1
> if Request.Form ("unite_administrative")="" then erreur=1
> if Request.Form ("personne_ressource")="" then erreur=1
> if Request.Form ("delai_de_livraison")="" then erreur=1
> if Request.Form ("date")="" then erreur=1

> response.write erreur

> if erreur=1 then Response.Redirect("incorrect.htm")

> %>

> <HTML>
> <HEAD>
> </HEAD>
> <BODY>
> </BODY>
> </HTML>

> and then this error occur ==>

> Response object error 'ASP 0156 : 80004005'

> Header Error

> /communications/traduction/facteur.asp, line 23

> The HTTP headers are already written to the client browser. Any HTTP
> header modifications must be made before writing page content.

> can someone help ?
> Thank



Sun, 09 Feb 2003 03:00:00 GMT  
 problem with response.redirect
You might want to try inserting your "<% Response.Redirect ("URL") %>"
between your opening HTML tag and opening BODY tag.

Example:
<HTML>
<% response.redirect http://www.yahoo.com %>
<BODY></BODY>
<HTML>

Regards,
Richard Soh
PaineWebber Inc.


Quote:
> problem with response.redirect

> i creat a web form (htm file) who submit to an ASP vbs page.
> this is my asp page code. here:


> <%
> dim erreur
> erreur=0

> if Request.Form ("titre_du_document")="" then erreur=1
> if Request.Form ("demandeur")="" then erreur=1
> if Request.Form ("telephone")="" then erreur=1
> if Request.Form ("PROVENANCE")="" then erreur=1
> if Request.Form ("unite_administrative")="" then erreur=1
> if Request.Form ("personne_ressource")="" then erreur=1
> if Request.Form ("delai_de_livraison")="" then erreur=1
> if Request.Form ("date")="" then erreur=1

> response.write erreur

> if erreur=1 then Response.Redirect("incorrect.htm")

> %>

> <HTML>
> <HEAD>
> </HEAD>
> <BODY>
> </BODY>
> </HTML>

> and then this error occur ==>

> Response object error 'ASP 0156 : 80004005'

> Header Error

> /communications/traduction/facteur.asp, line 23

> The HTTP headers are already written to the client browser. Any HTTP
> header modifications must be made before writing page content.

> can someone help ?
> Thank



Sun, 09 Feb 2003 03:00:00 GMT  
 problem with response.redirect
I believe the problem is due to having a Response.write statement occur
before the header was sent to the browser.  Consider trying this:


<HTML>
<HEAD>
</HEAD>
<BODY>
<%
dim erreur
erreur=0
if Request.Form ("titre_du_document")="" then erreur=1
if Request.Form ("demandeur")="" then erreur=1
if Request.Form ("telephone")="" then erreur=1
if Request.Form ("PROVENANCE")="" then erreur=1
if Request.Form ("unite_administrative")="" then erreur=1
if Request.Form ("personne_ressource")="" then erreur=1
if Request.Form ("delai_de_livraison")="" then erreur=1
if Request.Form ("date")="" then erreur=1
response.write erreur

if erreur=1 then Response.Redirect("incorrect.htm")

%>
</BODY>
</HTML>


Quote:
> already try that and no luck !


> > The error code you are seeing means that you have already written
something
> > to the client (browser), in your case:
> >     response.write erreur

> > If you remove that line the response.redirect should work fine.

> > Luke



> > > problem with response.redirect

> > > i creat a web form (htm file) who submit to an ASP vbs page.
> > > this is my asp page code. here:


> > > <%
> > > dim erreur
> > > erreur=0

> > > if Request.Form ("titre_du_document")="" then erreur=1
> > > if Request.Form ("demandeur")="" then erreur=1
> > > if Request.Form ("telephone")="" then erreur=1
> > > if Request.Form ("PROVENANCE")="" then erreur=1
> > > if Request.Form ("unite_administrative")="" then erreur=1
> > > if Request.Form ("personne_ressource")="" then erreur=1
> > > if Request.Form ("delai_de_livraison")="" then erreur=1
> > > if Request.Form ("date")="" then erreur=1

> > > response.write erreur

> > > if erreur=1 then Response.Redirect("incorrect.htm")

> > > %>

> > > <HTML>
> > > <HEAD>
> > > </HEAD>
> > > <BODY>
> > > </BODY>
> > > </HTML>

> > > and then this error occur ==>

> > > Response object error 'ASP 0156 : 80004005'

> > > Header Error

> > > /communications/traduction/facteur.asp, line 23

> > > The HTTP headers are already written to the client browser. Any HTTP
> > > header modifications must be made before writing page content.

> > > can someone help ?
> > > Thank



Sun, 09 Feb 2003 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. problem with response.redirect

2. Style Sheet problem with response.redirect

3. problem with response.redirect and forms

4. Problem with Response.Redirect vs. frames

5. Response Redirect doesn't Work - No me funciona Response Redirect

6. Response.Redirect + Netscape Browser + StyleSheets = Problem!

7. Response Redirect problem

8. Response.Redirect problem...

9. Response.Redirect + Netscape Browser + StyleSheets = Problem!

10. Problem Launching RealPlayer After Response.Redirect

11. Response.Redirect problem

12. ASP problem: response.redirect

 

 
Powered by phpBB® Forum Software