Re: Lightbox form CakePHP 2.0

2011-12-22 Thread Florin Trifu
Thank you! On Thu, Dec 22, 2011 at 12:58 PM, stefanski wrote: > Hi Florin. > > I read through your question again. I would go for this: > - create a controller function that returns all countries as json > - when the lightbox is closed, call that controller function by ajax and > populate the cou

Re: Lightbox form CakePHP 2.0

2011-12-22 Thread stefanski
Hi Florin. I read through your question again. I would go for this: - create a controller function that returns all countries as json - when the lightbox is closed, call that controller function by ajax and populate the country select values with the countries it's mostly javascript coding. -

Re: Lightbox form CakePHP 2.0

2011-12-19 Thread Florin Trifu
Thank you Stefanski That's one of the things I don't know how to do it, but it's not the only one. I honestly don't know where to start, I have the code from the example Geoff gave me but I'm starring at it not knowing what to do with it. But probably Geoff is right and I need to see the documenta

Re: Lightbox form CakePHP 2.0

2011-12-18 Thread stefanski
In case you wonder abput how to clse the lightbox, after the form is processed successfully, this is how i implemented it: in any ajax-popup-controller controller action: if ($form_processed_sucessfully) { $this->render(null, 'ajax', '/ajax_refresh'); } views/ajax_refresh.ctp: document.locatio

Re: Lightbox form CakePHP 2.0

2011-12-17 Thread Geoff Douglas
I use this functionality all the time... You can just copy the tutorial from the jQuery demo page. That's what I have done, until I understood what everything does. You can't expect someone to just know exactly what you want and write it for you... If you want that, then you need to hire someon

Re: Lightbox form CakePHP 2.0

2011-12-17 Thread Florin Trifu
So... no one doesn't have any other tip? Nobody didn't use this kind of functionality? On Fri, Dec 16, 2011 at 8:54 PM, Geoff Douglas wrote: > Take a look at the http://jqueryui.com/demos/dialog/#modal-form > Modal Form demo. > > There is a function that fires when a user clicks the buttons. > >

Re: Lightbox form CakePHP 2.0

2011-12-16 Thread Florin Trifu
I know the example that you gave me even before I have sent the email on google groups. The reason I've asked is because I don't really know how to use it... I will try to put in place... On Fri, Dec 16, 2011 at 8:54 PM, Geoff Douglas wrote: > Take a look at the http://jqueryui.com/demos/dialog

Re: Lightbox form CakePHP 2.0

2011-12-16 Thread Geoff Douglas
Take a look at the http://jqueryui.com/demos/dialog/#modal-form Modal Form demo. There is a function that fires when a user clicks the buttons. There is a function that fires when the modal is open, and closed. (And many other "Events" you can tie functions to) A callback function is simply

Re: Lightbox form CakePHP 2.0

2011-12-16 Thread Florin Trifu
Thank you Geoff! Indeed, it's exactly what I want, but I hope it's also what I need. In case you've used this, could you please give a small example of how to implement it? One more thing, I don't understand exactly what a callback is and what exactly does it do. Could you please give a short pra

Re: Lightbox form CakePHP 2.0

2011-12-16 Thread Geoff Douglas
I suggest jQuery UI dialog. If you need something out of the box, it will work quite well for you. It has callbacks that you can use to load/save stuff via ajax http://jqueryui.com/demos/dialog/ -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out th

Lightbox form CakePHP 2.0

2011-12-16 Thread Florin Trifu
Hi all Environment example: - Countries controller --- add action --- add.ctp view - Cities controller --- add action --- add.ctp view Goal: - in cities controller, inside the add action, I want to put a link next to the select element containing all the countries from the database, tha