Ajax POST form does not work

2011-05-11 Thread heavylu
Hi,

I developed a site using cakephp 1.1, It has a lot of ajax elements
for updating multiple divs simultaneously and they worked pretty
well.  Now, I am migrating to cakephp 1.3, but I am not having such a
great experience.

Thanks to this [blog][2] I was able to get multiple divs updated, but
soon I got stuck again.

My current problem is with an ajax form which does not complete the
request to the url '/logs/logIn' ('/controller/action').

After submiting the form, Firebug shows me an error: POST
http://localhost/logs/logIn 404 not found, the request is interrupted
in the function request() of prototype, line 1530:

this.transport.send(this.body);

When I write the url directly in the browser, the site seems to work
as I would expect.  And when I change the type of the form from 'POST'
to 'GET' the ajax request is completed and the response is the one I
expected, but I DO NEED to do it with 'POST'.

I have read a lot of forums in which similar issues are discussed, but
no suggestion has help me to solve the problem:

 - I have checked my hhtp.conf and .htaccess files, they seem to be
fine according to the installation instructions (but I am not sure).
 - The action I am requesting does not use any view (in fact, 'GET'
and direct url requets function whit no need of the log_in.ctp view
file), and I have created the respective view when I try the 'POST'
ajax request, but It still does not work.

I am using the latest version of scriptaculous and protoype.js (1.7),
I am working with Firefox 3.6.17 on ubuntu.

Many thaks in advance for any trick, tip, advice or whatever you can
do to help me.

[2]: 
http://schneimi.wordpress.com/2007/10/27/update-multiple-fields-with-one-ajax-request-response/

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


How to render jscript code into a div when updating with Ajax

2008-10-28 Thread heavylu

HI everyone,

I adapted an sliding menu made in java script to be used in my
project, I got it to work with the framework, but just in some cases:
It can be called as component and displayed on a div on my layout in
normal use, but when I use ajax to update the content of the div and I
try to render the menu into the div, the site breaks down and the
entire layout is dropped. I mean, the html headers and everything is
ignored so the javascript catches many errors and is not displayed
properly, and the other divs of the layout disappear.  This bug only
happens when I try to put the javascript into the div; when I put pure
html everything goes smoothly.

I hope someone knows what is wrong with my site.

Thanks in advance.




--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Update the content of a div a form is in after submit

2008-10-17 Thread heavylu

Hi everyone,

I have been working on this problem for many weeks and I have not
solved it yet:  I have 3 divs in a layout and I want the three of them
to update when I submit an ajax form I put into one of them, but when
I send the form (even if I just use a bare ajax link) the resultant
layout does not include any html heading so everything break down.  I
get it to work if I  ask the system to update the divs where the form
is not in... I would publish the code but is a little huge. If anyone
could help me I'll send him the code I am using.

Thanks in advance... I hope I have been clear enough, otherwise I'll
rewrite the post to make it  more understandable...

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---