Re: Need help on password generation

2009-06-02 Thread liaogz82
Hi Bryan, I don't quite understand how to do the echo password thingy. the password is to be displayed in the textbox, something akin to document.getElementById(password); should i put it under $html- input? On May 27, 3:28 pm, Bryan Paddock bryanpadd...@gmail.com wrote: Hi Gangzheng, Use the

Need help on password generation

2009-05-27 Thread liaogz82
Hi all, I need help on the cakePHP coding. I have a function called generatePassword() in the controller. I want to create an ajax link in such a way that user can click on the link and it will talk to the method, take the password and display it on the textbox. Can this be done? Gangzheng

Re: Need help on password generation

2009-05-27 Thread Bryan Paddock
Hi Gangzheng, Use the core ajax helper for that. in your controller: var $helpers = array('Ajax', 'Javascript') var $components = array('RequestHandler') in the view that is going to hold the link, create the link with the ajax helper instead of the html helper: echo $ajax-link( 'Generate