Re: auto complete input form
Hi Abhimanyu, Why should this be Ajax based? There is no need to send data to the server in this instance as it's readily available to the client when they enter a start date. With jQuery (my js framework of choice) adding 7 days could be as simple as: $( "#ModelNameStartDate" ).change(function () { var enteredString = this.val(); var stringParts= enteredString.split("/"); var jsDate = new Date(stringParts[2], stringParts[1], stringParts[0]); var endDate = jsDate.setDate(jsDate.getDate()+7); // add 7 days $( "#ModelNameEndDate" ).val( endDate ); }); To add months or years you would use: var endDate = jsDate.setMonth(jsDate.getMonth()+3); // add 1 months var endDate = jsDate.setFullYear(jsDate.getFullYear()+1); // add 1 year Of course the above relies on the user adding a valid start date with the correct seperators so would need a fair bit of extra work to ensure that was the case. I personally use jQuery and jQuery UI to add theme-able datepickers to my date fields, which significally improves the user interface (forces valid dates and a specific format). If you want to know how to do this get back in touch. HTH, Paul On Aug 13, 8:25 am, abhimanyu bv wrote: > hi all. > i am having two date input forms each for start data and end date.if i > select start date, end date should be automatically populated. i have > wrote code for populatinf end date but how to write an onchange of > input form for startdate,it should be ajax based. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
auto complete input form
hi all. i am having two date input forms each for start data and end date.if i select start date, end date should be automatically populated. i have wrote code for populatinf end date but how to write an onchange of input form for startdate,it should be ajax based. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Want help in using InPlaceEditor And Auto Complete together | CakePHP 1.3.8 Version
> Well Sir, I have tried to ... do the inPlaceEditor & autoComplete > Both separately & have successfully done that too .. and dont noe how and > where to proceed with ... to put both of them together. The way you found http://clockinfo.com/posts/32 seems to be pretty straightforward. i suggest you give that a try. you'll need to adapt it for your needs, which you might need to think about. expecting someone to pull a solution out of the bag for you which you wont need to do anything to is naive. Mike Karthauser Managing Director - Brightstorm Ltd Email: mi...@brightstorm.co.uk Web: http://www.brightstorm.co.uk Tel: 07939 252144 (mobile) Fax: 0870 1320560 Address: 1 Brewery Court, North Street, Bristol, BS3 1JS -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Want help in using InPlaceEditor And Auto Complete together | CakePHP 1.3.8 Version
Well Sir, I have tried to ... do the inPlaceEditor & autoComplete Both separately & have successfully done that too .. and dont noe how and where to proceed with ... to put both of them together. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Want help in using InPlaceEditor And Auto Complete together | CakePHP 1.3.8 Version
> Still Waiting. you'll never going to get someone to help you if you bump your post like that. ask a question showing some effort that you've at least made some attempt at solving the topic and i'll be able to help. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Want help in using InPlaceEditor And Auto Complete together | CakePHP 1.3.8 Version
Still Waiting. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Want help in using InPlaceEditor And Auto Complete together | CakePHP 1.3.8 Version
Can anyone show me way to used both InPlaceEditor And Auto Complete together in CakePHP 1.3.8 Version i have read this article, http://clockinfo.com/posts/32 but it seems too complicated to me. Waiting for some simpler solution. Thanks :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Auto complete in Cakephp
I tried again with the Ajax Helper autocomplete. But now i am getting an error ajax/autoComplete?q=s *NOT FOUND* * * i have the ajax helper and javascript helper in my app/views/helpers And i have include jquery.autocomplete.js in my view. What i doing wrong. I have also included the ajax helper in my controller. I am really not getting what i am doing wrong in here. On Tue, Apr 5, 2011 at 10:40 AM, Shashank wrote: > Hey guys, i want to know one more thing in autocomplete. I managed to get > it working. Now wat i was thnkng is, how can i get multiple autocomplete in > a single input field comma seperated. > > I mean suppose i type "ca" and get camera and now i place a "," and type > "ha" than i need it should show me "handle". how can i achieve ds. > > The js i am using is this > > file:app/webroot/js/application.js > $(document).ready(function(){ > // Caching the movieName textbox: > var username = $('#username'); > > // Defining a placeholder text: > username.defaultText('Search for people'); > > // Using jQuery UI's autocomplete widget: > username.autocomplete({ > minLength: 1, > multiple: true, > multipleSeparator: " ", > source: 'search' > }); > > }); > > // A custom jQuery method for placeholder text: > > $.fn.defaultText = function(value){ > > var element = this.eq(0); > element.data('defaultText',value); > > element.focus(function(){ > if(element.val() == value){ > element.val('').removeClass('defaultText'); > } > }).blur(function(){ > if(element.val() == '' || element.val() == value){ > element.addClass('defaultText').val(value); > } > }); > > return element.blur(); > } > > > On Tue, Apr 5, 2011 at 4:36 AM, BenJsno wrote: > >> hi, >> You have to import jQuery and jQuery UI >> I use autocomplete too and it works fine. >> check this tutorial : >> http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/ >> >> >> On 4 avr, 17:12, Shashank wrote: >> > Hey guys, can anyone plz suggest me what can be done for this?? >> > >> > On Mon, Apr 4, 2011 at 8:31 PM, Shashank >> wrote: >> > > Hi Guys, >> > > I am trying to use autocomplete in my cakephp, but getting an error >> > > like ds: >> > >> > > $("#UserUsername").autocomplete is not a function >> > > [Break on this error] $('#UserUsername').autocomplete('/events/ >> > > addevent', {}); >> > >> > > i have no idea why i am getting this error??. >> > >> > > Can anyone suggest me anything?? >> > >> > -- >> > Shashank Singh >> > B.E.(Computer Science) >> > Software Developer >> > +91-9711882054 >> > +91-9560545085 >> > Skype id: shashank.singh87 >> > Email: shashank.si...@sourcefuse.com >> >> -- >> Our newest site for the community: CakePHP Video Tutorials >> http://tv.cakephp.org >> Check out the new CakePHP Questions site http://ask.cakephp.org and help >> others with their CakePHP related questions. >> >> >> To unsubscribe from this group, send email to >> cake-php+unsubscr...@googlegroups.com For more options, visit this group >> at http://groups.google.com/group/cake-php >> > > > > -- > Shashank Singh > B.E.(Computer Science) > Software Developer > +91-9711882054 > +91-9560545085 > Skype id: shashank.singh87 > Email: shashank.si...@sourcefuse.com > > -- Shashank Singh B.E.(Computer Science) Software Developer +91-9711882054 +91-9560545085 Skype id: shashank.singh87 Email: shashank.si...@sourcefuse.com -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Auto complete in Cakephp
Hey guys, i want to know one more thing in autocomplete. I managed to get it working. Now wat i was thnkng is, how can i get multiple autocomplete in a single input field comma seperated. I mean suppose i type "ca" and get camera and now i place a "," and type "ha" than i need it should show me "handle". how can i achieve ds. The js i am using is this file:app/webroot/js/application.js $(document).ready(function(){ // Caching the movieName textbox: var username = $('#username'); // Defining a placeholder text: username.defaultText('Search for people'); // Using jQuery UI's autocomplete widget: username.autocomplete({ minLength: 1, multiple: true, multipleSeparator: " ", source: 'search' }); }); // A custom jQuery method for placeholder text: $.fn.defaultText = function(value){ var element = this.eq(0); element.data('defaultText',value); element.focus(function(){ if(element.val() == value){ element.val('').removeClass('defaultText'); } }).blur(function(){ if(element.val() == '' || element.val() == value){ element.addClass('defaultText').val(value); } }); return element.blur(); } On Tue, Apr 5, 2011 at 4:36 AM, BenJsno wrote: > hi, > You have to import jQuery and jQuery UI > I use autocomplete too and it works fine. > check this tutorial : > http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/ > > > On 4 avr, 17:12, Shashank wrote: > > Hey guys, can anyone plz suggest me what can be done for this?? > > > > On Mon, Apr 4, 2011 at 8:31 PM, Shashank > wrote: > > > Hi Guys, > > > I am trying to use autocomplete in my cakephp, but getting an error > > > like ds: > > > > > $("#UserUsername").autocomplete is not a function > > > [Break on this error] $('#UserUsername').autocomplete('/events/ > > > addevent', {}); > > > > > i have no idea why i am getting this error??. > > > > > Can anyone suggest me anything?? > > > > -- > > Shashank Singh > > B.E.(Computer Science) > > Software Developer > > +91-9711882054 > > +91-9560545085 > > Skype id: shashank.singh87 > > Email: shashank.si...@sourcefuse.com > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > -- Shashank Singh B.E.(Computer Science) Software Developer +91-9711882054 +91-9560545085 Skype id: shashank.singh87 Email: shashank.si...@sourcefuse.com -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Auto complete in Cakephp
hi, You have to import jQuery and jQuery UI I use autocomplete too and it works fine. check this tutorial : http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/ On 4 avr, 17:12, Shashank wrote: > Hey guys, can anyone plz suggest me what can be done for this?? > > On Mon, Apr 4, 2011 at 8:31 PM, Shashank wrote: > > Hi Guys, > > I am trying to use autocomplete in my cakephp, but getting an error > > like ds: > > > $("#UserUsername").autocomplete is not a function > > [Break on this error] $('#UserUsername').autocomplete('/events/ > > addevent', {}); > > > i have no idea why i am getting this error??. > > > Can anyone suggest me anything?? > > -- > Shashank Singh > B.E.(Computer Science) > Software Developer > +91-9711882054 > +91-9560545085 > Skype id: shashank.singh87 > Email: shashank.si...@sourcefuse.com -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Auto complete in Cakephp
On Mon, Apr 4, 2011 at 11:01 AM, Shashank wrote: > Hi Guys, > I am trying to use autocomplete in my cakephp, but getting an error > like ds: > > $("#UserUsername").autocomplete is not a function > [Break on this error] $('#UserUsername').autocomplete('/events/ > addevent', {}); > > > i have no idea why i am getting this error??. > > Can anyone suggest me anything?? That appears to be a javascript--specifically jquery--error. My guess is you either don't have jquery or some autocomplete plugin loaded -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Auto complete in Cakephp
Hey guys, can anyone plz suggest me what can be done for this?? On Mon, Apr 4, 2011 at 8:31 PM, Shashank wrote: > Hi Guys, > I am trying to use autocomplete in my cakephp, but getting an error > like ds: > > $("#UserUsername").autocomplete is not a function > [Break on this error] $('#UserUsername').autocomplete('/events/ > addevent', {}); > > > i have no idea why i am getting this error??. > > Can anyone suggest me anything?? -- Shashank Singh B.E.(Computer Science) Software Developer +91-9711882054 +91-9560545085 Skype id: shashank.singh87 Email: shashank.si...@sourcefuse.com -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Auto complete in Cakephp
Hi Guys, I am trying to use autocomplete in my cakephp, but getting an error like ds: $("#UserUsername").autocomplete is not a function [Break on this error] $('#UserUsername').autocomplete('/events/ addevent', {}); i have no idea why i am getting this error??. Can anyone suggest me anything?? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Problem with Auto complete
Hi to all I m using Using Autocomplete component but when i use it nothing displayed at browser white blank page is use it from from http://bakery.cakephp.org/articles/view/autocomplete this is my cod my controller var $components = array('PageCommand','Jumplink','PageTrack','Pagination','Upload','Autocomplete'); var $helpers = array('Html','Ajax','Javascript', 'Command','TurboAjax','Time','Pagination'); view : autoComplete('Countries/name'); ?> when i use this a blank page apearedhelp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Auto Complete
2007/5/11, afindie <[EMAIL PROTECTED]>: > var $helpers = array('Html', 'Javascript', 'Ajax'); these are standard helpers, which reside in /cake/cake Take a look also here: http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/ and http://bakery.cakephp.org/articles/view/autocomplete#comment-907 and reading the manual again and again also helps ;) Siegfried -- Siegfried Hirsch hhS - Welserstr. 1 - 81373 München - (089) 5484 3564 - skype:shirsch http://gadgetgui.de / http://www.rss-blogger.de http://www.newsbee.de NewsBee 2 - customized RSS solutions --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Auto Complete
Hi all, New Cake here, I tried the auto complete tutorials with Nate. But I couldn't make it working. I think i am just missing some of the helpers? var $helpers = array('Html', 'Javascript', 'Ajax'); Which I don't have any of them, help? thanks andy. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problems with Auto-Complete in an Ajax Form
Finally figured it out. I just bagged the autocomplete component and used the helper the regular way (http://manual.cakephp.org/chapter/helpers). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problems with Auto-Complete in an Ajax Form
I'm still stuck on this... Any help would be appreciated. Here's the form code in my view: form(array('action' => '/member/address_books'), 'post', array('update' => 'addressBookContent')) ?> labelTag('User/username', 'Username: ') ?> autocomplete('User/username', '/member/address_books/auto') ?> submit('Add Contact') ?> submit('Add Contact', array('url' => '/member/address_books/add', 'update' => 'addressBookContent', 'class'=>'submit-form')); ?> and here's the controller code: data)) { $data = $this->AddressBook->findByUserId($this->Session->read('User.id')); if (empty($data)) { $this->AddressBook->save(array('AddressBook' => array('user_id' => $this->Session->read('User.id'; $data = $this->AddressBook->findByUserId($this->Session->read('User.id')); $users = array(); } $this->set('data', $data); $users = array(); foreach ($data['User'] as $key => $user) if (is_numeric($key)) $users[$user['username']] = $user['username']; $this->set('users', $users); $this->render(); } else { $this->cleanUpFields(); $addressBook = $this->AddressBook->findByUserId($this->Session->read('User.id')); if (!empty($this->data['User']['username'])) $user = $this->User->findByUsername($this->data['User']['username']); if (!empty($this->data['User']['username']) && $this->AddressBook->addAssoc($addressBook['AddressBook']['id'], 'User', $user['User']['id'])) { $data = $this->AddressBook->findByUserId($this->Session->read('User.id')); $this->set('data', $data); $users = array(); foreach ($data['User'] as $key => $user) if (is_numeric($key)) $users[$user['username']] = $user['username']; $this->set('users', $users); $this->Session->setFlash(ucwords($this->data['User']['username']) . ' Is Now In Your Address Book.'); $this->render(); } else { $this->Session->setFlash('Contact Username Not Found.'); $data = $this->AddressBook->findByUserId($this->Session->read('User.id')); $this->set('data',$data); $users = array(); foreach ($data['User'] as $key => $user) if (is_numeric($key)) $users[$user['username']] = $user['username']; $this->set('users', $users); } } } // END function index } // END class AddressBooksController ?> I've tried several different things and can't seem to get autocomplete working inside the ajax form. thanks again, chowsapal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problems with Auto-Complete in an Ajax Form
So I've got an ajax form with an ajax auto-complete field in it, using the auto-complete component. It works find if I replace the Ajax submit with a regular submit, or if I use the Ajax form and disable the Autocomplete component (but then, of course, the autocomplete doesn't work). Unfortunately, the autocomplete component seems to be grabbing any ajax request, and when I submit the ajax form, instead of calling the action I'm looking for, it returns the autocomplete list in my content div instead. Is it possible to use an autocomplete field with an ajax form? Thanks a lot, chowsapal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---