CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Afterinsert event with ccs

Print topic Send  topic

Author Message
folkerts
Posted: 06/26/2002, 6:42 AM

ive got these three functions. All the same and only the AfterInsert gives me the Warning: Cannot add header information - headers already sent by (output started at c:\www\CategoryRecord_events.php:42) in c:\www\categoryrecord.php on line 484

why?? where to put the refresh pages scripts for insert
folkerts


function category_AfterUpdate() { //category_AfterUpdate @2-1776DA88

//Custom Code @16-2A29BDB7
// -------------------------
echo "<script>window.open('tree.php?p=".CCToURL(CCGetSession("p",""))."','Navigatie')</script>" ;
echo "<script>window.opener.history.go(0)</script>" ;
echo "<script>window.close()</script>" ;
// -------------------------
//End Custom Code

} //Close category_AfterUpdate @2-FCB6E20C

function category_AfterDelete() { //category_AfterDelete @2-30E8BF84

//Custom Code @17-2A29BDB7
// -------------------------
echo "<script>window.open('tree.php?p=".CCToURL(CCGetSession("p",""))."','Navigatie')</script>" ;
echo "<script>window.opener.history.go(0)</script>" ;
echo "<script>window.close()</script>" ;
// -------------------------
//End Custom Code

} //Close category_AfterDelete @2-FCB6E20C

function category_AfterInsert() { //category_AfterInsert @2-6ABE6DF8

//Custom Code @18-2A29BDB7
// -------------------------
echo"<script>window.open('tree.php?p=".CCToURL(CCGetSession("p",""))."','Navigatie')</script>" ;
// -------------------------
//End Custom Code

} //Close category_AfterInsert @2-FCB6E20C
Freeman Kusek
Posted: 06/27/2002, 1:11 AM

I am not sure what the problem is but the error mentioned usually occurs if you try to output content to a page after the page has alreay been processes. I have experienced this error a couple of times when I try to print out content in the record form events that occur on the server side. An event such as After Insert takes place on the serve and has no manifestation on the browser so if you try to write out something in this event, the error occurs.
Nicole
Posted: 06/28/2002, 5:05 AM

Hello,
you get the error due to using "echo" function before redirect code is executing. Refer to PHP docs for more information: http://www.php.net/manual/en/function.header.php

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.