computerman
Posts: 27
|
| Posted: 05/10/2010, 7:44 AM |
|
I have a record that placed in a update panel, this is all fine, but in afterupdate event of that record I have :
header( "Location: confirmation.php" ) ;
as last line.
To inform user about record processed properly, should load this confirmation page.
But when I run it, it just ignores redirect and I stay in the same page.
any ideas how can I 'exit' from boundaries of update panel??
(I also tried "return page" property of that record simply not works)
give a hand please,
thank you.
_________________
"whoever is a cruel, must be an old downtrod who has got authority,
whoever is a downtrod, must be an old cruel who has lost authority. "
An Oriental Saying |
 |
 |
datadoit
|
| Posted: 05/10/2010, 7:52 AM |
|
Always use 'exit' immediately after using the header() function in PHP.
header("Location: YourPage.php"); exit;
|
|
|
 |
jjrjr1
Posts: 942
|
| Posted: 05/10/2010, 8:20 AM |
|
Actually you might try in your after update event.
global $Redirect;
$Redirect="yourredirectpage.php";
That is a little more CCS Esque....
LOL
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
computerman
Posts: 27
|
| Posted: 05/10/2010, 12:54 PM |
|
Quote jjrjr1:
Actually you might try in your after update event.
global $Redirect;
$Redirect="yourredirectpage.php";
That is a little more CCS Esque....
LOL
and..best saviors oscar goes to datadoit and jjrjr1 :)
thank you so much people!
while talking of globals, If you can, could you please enlighten me about this,
how to make a global variable as a real global ?
so in every label's beforeshow event from same page (but belongs to different records, grids etc.) I won't need repeat it.?
As I am fed up to write billions of "$a = ccgetcookie("prefences") ;" in each label's beforeshow.
_________________
"whoever is a cruel, must be an old downtrod who has got authority,
whoever is a downtrod, must be an old cruel who has lost authority. "
An Oriental Saying |
 |
 |
jjrjr1
Posts: 942
|
| Posted: 05/10/2010, 1:45 PM |
|
Hi
This is the sort of thing that you as a programmer should be familiar with even using a RAD tool.
As I mentioned in my response to your RAD Tool Question Post http://forums.yessoftware.com/posts.php?post_id=110963
Using a tool like CodeCharge Studio does not remove the requirement of being a programmer / developer unless you are building the simplest of web applications
I would suggest you check out: http://us3.php.net/manual/en/language.variables.scope.php http://php.net/manual/en/reserved.variables.globals.php http://www.thewebsqueeze.com/web-design-tutorials/writi...l-variable.html
These links might help you understand how to use and implement global variables in PHP.
Hope that helps..... Remember Google is your friend 
PS. A hint on your question above..
In the afterpage initialize event for the page do a custom code like so
global $preferences;
$preferences=CCGetSession("preferences","");
or
$prefereces=CCGetCookie("preferences","");
Now in any event you need the value of $preferences simply put a custom code event at the top of any series of events that does
global $preferences;
Doing that will make $preferences available to all functions in that controls or components event code
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
jjrjr1
Posts: 942
|
| Posted: 05/10/2010, 2:16 PM |
|
BTW.. I would use session variables instead of cookies.... Just in case a visitor has cookies blocked...
Example above
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
computerman
Posts: 27
|
| Posted: 05/10/2010, 4:21 PM |
|
thank you jjrjr1,
as a starter programmer which using a tool like CodeCharge Studio and have not got removed the requirement of being a programmer / developer unless I am building the simplest of web applications, I understood well.
_________________
"whoever is a cruel, must be an old downtrod who has got authority,
whoever is a downtrod, must be an old cruel who has lost authority. "
An Oriental Saying |
 |
 |
|