Thursday, January 28, 2010

Re: Submit form data with ajax helper only work when the debug is on

You'll have to post your Cake code, I think.

Do you use Debugger class anywhere? Also, try putting some $this->log
('...') lines in.

On Jan 28, 7:29 pm, Jeruliu <jeru....@gmail.com> wrote:
> As captioned, this is very strange that i can't figure it out till
> now.
> I'm using Cakephp with the jquery to submit the form.
>
> I've spent sometime to investigate the issue, here is my script in
> html source
>
> //<![CDATA[
> jQuery('#form56388588').submit( function() {
>    jQuery('#form56388588').ajaxSubmit({
>        beforeSend:function(request) {
>            request.setRequestHeader('X-Update', 'myicons');},
>        success:function(data, textStatus) {
>            jQuery('#myicons').html(data);}, async:true, type:'post',
> url:'/mysite/markers/add'}); return false;});
> //]]>
>
> Please be noted that when debug is on and off the html sources are
> exactly the same but they come up with different enddings.
>
> When debug is off the "data" in sucess function is empty, while i can
> see sth when debug is on
>
> This is a view page named add.ctp which is under the control of my
> Markers Controller.
>
> I'm suffering from it for 3 days, can anyone help?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: