Forums

This topic is locked

HTTP Header Error Msg

Posted 24 Aug 2001 17:12:15
1
has voted
24 Aug 2001 17:12:15 Andrew Watson posted:
Im getting an error which doesnt occur in my local site, only the live one.

I have a pop up page which simply asks for an email and name, these are inserted to a db and then the page redirects to a blank page which closes the popup window down.

this closer page writes a cookie to avoid people filling it in twice. im getting this error when the form is submitted.

--------CODE----------------->

Response object error 'ASP 0156 : 80004005'

Header Error

/discounter/addname.asp, line 103

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


----------------END CODE------------->

Is it the location of the cookie code on my page? i thought so but even writing the cookie before the html tags produces the error.

addname.asp line 103 reads

---------CODE---------------->


If (MM_editRedirectUrl <> "" Then
(103) Response.Redirect(MM_editRedirectUrl)
End If
End If

-------END CODE--------------->

The redirect page (which writes this damn cookie) reads.....

------CODE-------------->

<~%@LANGUAGE="VBSCRIPT"%>
<~%
~Response.Cookies("discounted"="true"
~Response.Cookies("discounted".Expires = ~Date+30
%~>
<~html>
<~head>


<~script language="JavaScript">
<~!--
'function tmt_winControl(id,c){
' var d=eval(id==null||eval'(id+".closed";
if(!d){eval(id+"."+c);}
}
/~/-->
<~/script>
<~/head>

<~body bgcolor="#FFFFFF" text="#000000" on~Load="tmt_winControl('self','close()')">
<~/body>
<~/html>

---------------END CODE----------------->

IGNORE ALL THE ~ things, there is none in my real code <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

CAN ANYONE HELP, i had a similar problem recently but simply changing where the script to write the cookies was sorted it out.

If you can help, and im sure you fellas can, then many many thanks.



Reply to this topic