Re: ajax editor and view

2007-03-08 Thread sanjeevdivekar

Thanks Guys
This Group is Really HOT


On Mar 4, 9:52 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> On 3/4/07, phirschybar <[EMAIL PROTECTED]> wrote:
>
>
>
> > gwoo's method is the way to go. I wouldn't recommend editing the
> > webroot/index.php
>
> The only reason, I don't mind editing my index.php file is because I
> only do it on my dev machine ;)  in production I have debug set to 0
> so it's not an issue ;)
>
> Sam D


--~--~-~--~~~---~--~~
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: ajax editor and view

2007-03-04 Thread Samuel DeVore

On 3/4/07, phirschybar <[EMAIL PROTECTED]> wrote:
>
> gwoo's method is the way to go. I wouldn't recommend editing the
> webroot/index.php

The only reason, I don't mind editing my index.php file is because I
only do it on my dev machine ;)  in production I have debug set to 0
so it's not an issue ;)

Sam D

--~--~-~--~~~---~--~~
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: ajax editor and view

2007-03-04 Thread phirschybar

gwoo's method is the way to go. I wouldn't recommend editing the
webroot/index.php

On Mar 4, 4:23 am, "gwoo" <[EMAIL PROTECTED]> wrote:
> this should work too. In AppController or any other Controller.
> Remember to include RequestHandler in your components array.
>
> functon beforeRender() {
> if($this->RequestHandler->isAjax() || $this->RequestHandler->isXml()) {
>
> Configure::write('debug', 0);
> }
>
> }


--~--~-~--~~~---~--~~
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: ajax editor and view

2007-03-04 Thread gwoo

this should work too. In AppController or any other Controller.
Remember to include RequestHandler in your components array.

functon beforeRender() {
if($this->RequestHandler->isAjax() || $this->RequestHandler-
>isXml()) {
Configure::write('debug', 0);
}
}


--~--~-~--~~~---~--~~
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: ajax editor and view

2007-03-03 Thread Samuel DeVore

you can also edit your webroot/index.php  at the last line add a test
for if the request is an ajax one (this is an exercise left up to the
reader) and not add the timing line (I do this for xml/rest/soap
requests) .

On 3/3/07, bernardo <[EMAIL PROTECTED]> wrote:
>
>
>
> On Mar 3, 8:45 am, "sanjeevdivekar" <[EMAIL PROTECTED]> wrote:
> > Hey,
> >
> > I am also in same trobule when i edit 2nd time i see "test message" in text box.
> > what u do with control.js?
>
> What you are seeing is the debug timing information that cake php adds
> when the debug level is set to 1. Remember that any output generated
> will be added to the ajax response. Simply define debug to 0 and
> you'll stop seeing it.
>
>
> >
>


-- 
==
S. DeVore
(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

--~--~-~--~~~---~--~~
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: ajax editor and view

2007-03-03 Thread bernardo



On Mar 3, 8:45 am, "sanjeevdivekar" <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I am also in same trobule when i edit 2nd time i see "test message" in text box.
> what u do with control.js?

What you are seeing is the debug timing information that cake php adds
when the debug level is set to 1. Remember that any output generated
will be added to the ajax response. Simply define debug to 0 and
you'll stop seeing it.


--~--~-~--~~~---~--~~
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: ajax editor and view

2007-03-03 Thread sanjeevdivekar

Hey,

I am also in same trobule when i edit 2nd time i see "test message" in text box.
what u do with control.js?

On Mar 2, 8:20 pm, "dhalsim" <[EMAIL PROTECTED]> wrote:
> I've checked this already but it is not the problem.
> So I solve the problem in controls.js from script.aculous lib with a
> kindy trim function on the new value.
>
> On 28 fév, 17:16, "bernardo" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Make sure the spaces are not in your source files (before or after the
> > php tags) as these spaces will be added to theajaxresponse.
>
> > On Feb 28, 10:13 am, "dhalsim" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I've put anajaxeditorin my view and the problem I have is when I
> > > edit my field for the second or more time, the value in the text field
> > > is prefixed with sereval tabulation (I don't see directly the value in
> > > the input). I don't understand where they come from.
>
> > > this is a piece of my view :
> > > 
> > >   
> > > 
> > > editor('ajax_edit_nom','/utilisateurs/ajax_update/'.
> > > $user['utilisateurid'].'/nom')); ?>
>
> > > and my UtilisateursController with the ajax_update() method :
>
> > > function ajax_update($id,$sub)
> > > {
> > > $value = $this->params['form']['value']; //new value
> > > to save
>
> > > $this->Utilisateur->id = $id;
> > > if (!$this->Utilisateur->saveField($sub, $value,
> > > true))
> > > {
> > > $this->set('error', true);
> > > }
> > > $user = $this->Utilisateur->read(array($sub), $id);
> > > $this->set('value',$user['Utilisateur'][$sub]);
> > > $this->layout = 'ajax';
> > > }
>
> > > and finally th ajax_update.thtml
> > > 
>
> > > If anybody has an idea...- Hide quoted text -
>
> - Show quoted text -


--~--~-~--~~~---~--~~
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: ajax editor and view

2007-03-02 Thread dhalsim

I've checked this already but it is not the problem.
So I solve the problem in controls.js from script.aculous lib with a
kindy trim function on the new value.

On 28 fév, 17:16, "bernardo" <[EMAIL PROTECTED]> wrote:
> Make sure the spaces are not in your source files (before or after the
> php tags) as these spaces will be added to the ajax response.
>
> On Feb 28, 10:13 am, "dhalsim" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I've put an ajax editor in my view and the problem I have is when I
> > edit my field for the second or more time, the value in the text field
> > is prefixed with sereval tabulation (I don't see directly the value in
> > the input). I don't understand where they come from.
>
> > this is a piece of my view :
> > 
> >   
> > 
> > editor('ajax_edit_nom','/utilisateurs/ajax_update/'.
> > $user['utilisateurid'].'/nom')); ?>
>
> > and my UtilisateursController with the ajax_update() method :
>
> > function ajax_update($id,$sub)
> > {
> > $value = $this->params['form']['value']; //new value
> > to save
>
> > $this->Utilisateur->id = $id;
> > if (!$this->Utilisateur->saveField($sub, $value,
> > true))
> > {
> > $this->set('error', true);
> > }
> > $user = $this->Utilisateur->read(array($sub), $id);
> > $this->set('value',$user['Utilisateur'][$sub]);
> > $this->layout = 'ajax';
> > }
>
> > and finally th ajax_update.thtml
> > 
>
> > If anybody has an idea...


--~--~-~--~~~---~--~~
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: ajax editor and view

2007-02-28 Thread bernardo

Make sure the spaces are not in your source files (before or after the
php tags) as these spaces will be added to the ajax response.

On Feb 28, 10:13 am, "dhalsim" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've put an ajax editor in my view and the problem I have is when I
> edit my field for the second or more time, the value in the text field
> is prefixed with sereval tabulation (I don't see directly the value in
> the input). I don't understand where they come from.
>
> this is a piece of my view :
> 
>   
> 
> editor('ajax_edit_nom','/utilisateurs/ajax_update/'.
> $user['utilisateurid'].'/nom')); ?>
>
> and my UtilisateursController with the ajax_update() method :
>
> function ajax_update($id,$sub)
> {
> $value = $this->params['form']['value']; //new value
> to save
>
> $this->Utilisateur->id = $id;
> if (!$this->Utilisateur->saveField($sub, $value,
> true))
> {
> $this->set('error', true);
> }
> $user = $this->Utilisateur->read(array($sub), $id);
> $this->set('value',$user['Utilisateur'][$sub]);
> $this->layout = 'ajax';
> }
>
> and finally th ajax_update.thtml
> 
>
> If anybody has an idea...


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



ajax editor and view

2007-02-28 Thread dhalsim

Hi,

I've put an ajax editor in my view and the problem I have is when I
edit my field for the second or more time, the value in the text field
is prefixed with sereval tabulation (I don't see directly the value in
the input). I don't understand where they come from.

this is a piece of my view :

  

editor('ajax_edit_nom','/utilisateurs/ajax_update/'.
$user['utilisateurid'].'/nom')); ?>

and my UtilisateursController with the ajax_update() method :

function ajax_update($id,$sub)
{
$value = $this->params['form']['value']; //new value
to save

$this->Utilisateur->id = $id;
if (!$this->Utilisateur->saveField($sub, $value,
true))
{
$this->set('error', true);
}
$user = $this->Utilisateur->read(array($sub), $id);
$this->set('value',$user['Utilisateur'][$sub]);
$this->layout = 'ajax';
}

and finally th ajax_update.thtml


If anybody has an idea...


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---