you need to return the value you saved to the ajax in-place editor maybe something like(not tested: var $components = array('RequestHandler'); function update_stocks( ) { $this->autoRender = false; // don't attempt to render anything // for god's sake , don't use _POST. // $this->set('value', $_POST['value']); if(!empty($this->params['form'])) { $value = $this->params['form']['value']; // .. do something to it echo $value; // now return the value to the editor exit; // exit so you don't get debugging info, or you can do this: /* $db =& ConnectionManager::getDataSource('default'); $db->fullDebug = false; */ } }
On Apr 15, 12:41 am, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > it's from having your debug level to 1 > > On 4/14/07, rinda <[EMAIL PROTECTED]> wrote: > > > > > > > Hi, > > > The version is 1.1.3. > > This is my view: > > <div id="editme">blabla</div> > > <?= $ajax->editor('editme', '/admin/update_stocks') ?> > > > The controller function is simple. > > function update_stocks( ) > > { > > $this->set('value', $_POST['value']); > > $this->layout = 'ajax'; > > } > > > The response body is simpler (update_stocks.thtml): > > <?php > > print $value; > > ?> > > > I highlight the div and click it. It becomes form. Change it. Saved > > it. Okay. Nothing's wrong. > > Here comes the problem. I click it again. The value on the form > > becomes: > > value <!-- 0.2732s --> > > > So where does <!-- 0.2732s --> come from? The first time I click the > > div, there is no garbage number. But after second times and so on, the > > garbage number will show up. > > > Thank you. > > -- > (the old fart) the advice is free, the lack of crankiness will cost you > > - its a fine line between a real question and an idiot > > http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [EMAIL PROTECTED] 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 -~----------~----~----~----~------~----~------~--~---