CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Client notification

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 02/24/2005, 5:27 AM

I can't find a solution to this either in the news group or the manual so I am hoping that someone has solved this before.

I have a button on a page that when clicked, will check whether 100 records in a table have been flagged as completed. If less than 100 have been completed, I want to notify the user. I would like a javascript alert but I am not sure if it is possible to generate one from server-side php.
If anyone has any ideas as to how I can get a message to the user, please let me know.
Thanks,
Trevor
View profile  Send private message
RonB

Posts: 228
Posted: 02/28/2005, 12:51 PM

you could open a new window (window.open()) and load a page wich executes a query to check the records. In the before show event you could use the set tag action to decide what message should be displayed.

global $Tpl;
$db1= new clsDBConnection1();
$my_check=CCGetDBValue("select count * from table where flag=1",$db1);

if($my_check < 100)
{
$Tpl->SetVar("my_message", "not complete");
} else $Tpl->SetVar("my_message", "complete");

unset($db1);


All you have to do is place {my_message} on the page you open with window.open()

Hope this helps,

Ron
View profile  Send private message
saseow

Posts: 744
Posted: 02/28/2005, 8:18 PM

Hi Ron,

This really does help!! I expected that it had to be something like this but since this is my first attempt at CCS I was a touch lost.

Thank you so much for the help!

Kindest regards,

Trevor
View profile  Send private message

Add new topic Subscribe to topic   


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

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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