troych
Posts: 9
|
Posted: 06/23/2011, 4:09 PM |
|
hi there
im using ccs4.3, php, mysql
does anyone no how to create a popup alert for a grid depending on a date.
i have a grid with a list of names, date etc and i want a alert popup or something like this that will alert the user if a date is say i day before the date in the grid.
i can post some screen shots
any help would be great
regards
troy
|
|
|
troych
Posts: 9
|
Posted: 06/23/2011, 4:22 PM |
|
link to site
login= user= demo pass= demo
when you add a customer i need some sort of alert on the grid when the datetaken is a day before the datetaken, if you no what i mean
feel free to have a playhave a play
http://www.timaru.gen.nz/trs/data/log.php
troy
|
|
|
jjrjr2
Posts: 131
|
Posted: 06/24/2011, 7:14 AM |
|
Well I am not sure I know what you mean here.
Datetaken before Datetaken????
Also not sure what U mean by add a customer. Is this an editable grid???
Also, What if more than 1 record in the grid meets this criteria. Alert box for each grid entry displayed???
A little more info would be useful..
Making an alert popup is relatively easy...
If you want to do it from PHP code logic.. Just put a label in the html inside a javascript tag. Then in the before Show event put the javascript alert code into it..
If a label is impractical... Use the $Tpl object.
BTW I did go to your demo site.
John
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
Real Web Development At: http://RealWebDevelopment.us |
|
|
troych
Posts: 9
|
Posted: 06/24/2011, 3:11 PM |
|
hi there
yes your right a popup box wont do because there will be more than one result. http://www.timaru.gen.nz/trs/data/log.php
demo demo
what i need is some kind of a alert or onload that show the person when they first login if theres any jobs that are on for that day (taken from the "Scheduled" field on the grid list.
so when the admin person adds a new job they will put a date in the Scheduled texbox(witch i will turn into a date)
because the Scheduled date might be a week into the furture and buy then that job will be way down the list and might get missed.
does that make seance?
regards
troy
|
|
|
jjrjr2
Posts: 131
|
Posted: 06/25/2011, 8:42 AM |
|
Hi
What you are discussing now are design issues.
You need to determine what your requirements are and what you want the code's behavior to be.
Anything between changing the color of the grid row to having the William Tell Overture play can be done.....
You can cause anything you want to happen for those conditions. You just gotta know what you want the code to do...
John
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
Real Web Development At: http://RealWebDevelopment.us |
|
|
troych
Posts: 9
|
Posted: 06/25/2011, 3:07 PM |
|
changing the colour to orange and having them show at the top is what i want does anyone know how to do this?
|
|
|
jjrjr2
Posts: 131
|
Posted: 06/25/2011, 7:26 PM |
|
Hi
This is not too hard.
First to get the most due records at the top just set the order by value to be descending on scheduled date.
To turn it orange.... First get the hex value for the orange your wanna use. eg: #ff00ff ( that is prolly not orange but U get the idea)
In the <tr> tag for the grid row put <tr bgcolor="{color}">
Now in the before show row event add custom code something like this..
global $Tpl;
if(your date check){
$Tpl-SetVar("color","#xxxxxx"); //Where #xxxxxx is your orange color
}
Hope that helps
John
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
Real Web Development At: http://RealWebDevelopment.us |
|
|