Using the latest stable release - 1.1.15.5144
When I output $this->data in the controller, it returns NULL
On Jun 20, 2:05 pm, rtconner <[EMAIL PROTECTED]> wrote:
> What version of cake.
> Also you data likely wil lbe found in the $this->data variable in your
> controller.
>
> On Jun 20, 11:55 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
>
> > Pulling out my hair...
> > I'm trying to do a simple Ajax update from a select box. However, when
> > ajax makes the XMLHttpRequest, it doesn't pass the form data within
> > $this->params or $this->data.
>
> > If I modify the form to be a regular post form (without ajax), the
> > data gets passed just fine.
>
> > Here's what the ajax form looks like:
> > ---------------
> > View:
>
> > <form onSubmit="return false;">
> > <?php echo $html->hidden('Student/id',array('value' =>
> > $student['Student']['id'])); ?>
>
> > <div id="mytemplatelist">
> > <?php
> > echo
> > $html->selectTag('Student/programtemplate_id', $templatelist,
> > $student['Student']['programtemplate_id'], array('tabindex' => '2'));
> > ?>
> > </div>
>
> > <div id="programtemplateloading" style="display:none;">
> > Loading...
> > </div>
>
> > <div id="programtemplate">
> > <?php
> > echo $ajax->submit('Update', array('url' =>
> > 'editProgramTemplate',
> > 'update'=>'mytemplatelist'));
> > </div>
>
> > </form>
> > --------------
>
> > Controller:
>
> > function editProgramTemplate()
> > {
> > pr ($this->params);
> > $this->layout = "ajax";
> > }
> > ---------------
>
> > The Ajax call functions, however when I output $this->params, all I
> > get is:
>
> > Array
> > (
> > [pass] => Array
> > (
> > )
>
> > [controller] => student
> > [action] => editProgramTemplate
> > [url] => Array
> > (
> > [url] => student/editProgramTemplate
> > )
>
> > [bare] => 0
> > [webservices] =>
> > [plugin] =>
> > )
> > ----------
>
> > What am I doing wrong? I made sure to upgrade my install to the latest
> > stable release, just in case, but the same exact thing is still
> > happening. Any help would be greatly appreciated - thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---