On May 25, 6:36 am, chewie124 <[EMAIL PROTECTED]> wrote:
> I have an ajax driven form in cake, that works like a champ. it's
> really pretty simple: When you submit the form, it sends the request
> to the controller and then updates the div containing the html form
> with the response from the controller.
>
> Now, the thing that I'm trying to figure out is to include that form
> as an element in a non-cake php page (POPS - Plain Old PHP Script - no
> framework just html + php). I guess I could cheat and just include
> the ajax cake form in an iframe, but then that negates all the
> coolness of having an ajax form.
>
> Ideally, I wish I could do something like this in my plain PHP file:
> (the cake app is in a secondary level directory)
> ----- snippet ------
>
> <div id="div_containing_cake_ajax_form">
>
> <php? include ("cake/myform"); ?>
>
> </div>
>
> ---- end snippet----
>
> where the include would suck over the processed output from my cake
> view, instead of just trying to include the file contents, which it
> won't find.
>
> Anybody have any advice?
Sounds a bit cheaty, and as such:
what's wrong in that case with taking the cake generated form, copy it
and paste it in your none-cake app (with the appropriate js). OR just
write the js to trigger an ajax call in the none-cake app to populate
the form from your cake app when the page is loaded (better if the
form is likely to change).
hth,
AD
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---