So far everything has been great but I can’t figure this one out. It’s probably something stupid on my part. I created a combo in place of the default text area. It does not fire the php on load to fill the combo box. Once lightbox is up if I type it auto fills the names from the MySQL DB but how do you get it to load all the items at start up?
function by_id($filter) {
if (isset($_GET['ID']))
$filter->add("ID", $_GET['ID'], '=');
}
you need “id” instead of “ID”, the combo seems to always use lower case “id” for request parameter: github.com/DHTMLX/scheduler/blo … ors.js#L73
Everything should work if you replace that part as following:
function by_id($filter) {
if (isset($_GET['id']))
$filter->add("ID", $_GET['id'], '=');
}
Thank you for the reply. I tried it just to see and it still isn’t filled. I think the real problem is for some reason it never calls the customer.php to start with which would be needed to load the combo with the records but it never gets called until I start to type something and then it autofills with say the names that start with whatever letter I typed. What do I need to do so the combo gets filled from the start? Do I need to do an $.get call or something? My instinct says that it should load without having to make a separate call.
Since I guess this hasn’t happened to anyone before can someone at least tell me, should the php script be called when the main page or lightbox is called up? Or do I need to call the php script via another call first? Thanks.
Update: Changed to the below code, still no dice. It does not have the list even though I called the php and it ran successfully. Any ideas, anyone, Bueller, Bueller?
Hi,
sorry for a delay. Could you please attach a complete example (html page, php script, sql dump of test db tables and required js/css/php codebase) so I could try reproducing the issue?
Usually there shouldn’t be a problem with loading the initial option, since when you open the lightbox combo send a requrest to the script path providing a selected id as GET parameter (i.e. in your case the request url could look as “customers.php?id=3”), the server response should contain only a single item which will be displayed as a selected option in combo. If it for some reason doesn’t happen in your app we’ll need a demo to find out whats wrong
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan