THank you for your quick reply.
Can you show me how to this, or point me somewhere where i can learn that
please?
And where to add that?
array('update' => '#contentJ',
'noscript' => false,
'method' => 'POST',
'dataType'=>'html'
)
Like that?
beberlei wrote:
>
>
> You have to give dataType = html as additoinal parameter to the options,
> because for
> security by default ajax responses are handled as text.
>
> On Wed, 26 Nov 2008 08:07:39 -0800 (PST), vladimirn <[EMAIL PROTECTED]>
> wrote:
>>
>> I would like to figure this out:
>> On my index.phtml page is a link:
>> ------------------------------- index.phtml
>> --------------------------------------------------------
>> <?=$this->jQuery ();?>
>> <?=$this->ajaxLink(
>> "Home",
>> "/admin/index/hello",
>> array('update' =>
>> '#contentJ',
>> 'noscript' => false,
>> 'method' => 'POST'));
>> ?>
>> ----------------------------- end of index.phtml
>> --------------------------------------------------
>>
>> DIV contentJ is somwhere within same index.phtml page.
>>
>>
>> This function calling my helloAction inside indexController where i have:
>> ------------------------ part of indexController-
>> helloAction-------------------------------------
>> $news = $db->fetchAll ( $newssql );
>> $this->view->news = $news;
>> ------------------------ end
>> ------------------------------------------------------------------------
>>
>> and my hello.phtml view script showing:
>> ---------------------------- hello.phtml
>> -------------------------------------------------------------
>> <?php foreach ( $this->news as $news ) :?>
>> <?php echo $news['date'].' - '.$news['postedBy']?>
>>
>> <?php echo $this->ajaxLink(
>> "[ Edit ]",
>> "/admin/index/edit",
>> array( 'id' => 'edit',
>>
>> 'update' => '#contentJ',
>>
>> 'noscript' => false,
>>
>> 'method' => 'POST'));
>> ?>
>>
>> <?php echo $this->ajaxLink(
>> "[ Delete ]",
>> "/admin/index/delete",
>> array( 'id' =>
>> 'delete',
>>
>> 'update' => '#contentJ',
>>
>> 'noscript' => false,
>>
>> 'method' => 'POST'));
>> ?>
>>
>> <br>
>> <?php echo $news['newsText']?>
>> <br>
>> <br>
>> <?php endforeach; ?>
>> ----------------------------------end of hello.phtml
>> -------------------------------------------------------
>>
>> SO far you can see that i tried to create 2 links inside hello.phtml. All
>> data are displayed, but [ Edit ] and [ Delete ] links are not links at
>> all,
>> just plain text.
>> Is it possible to make them as ajaxLink within given container (contentJ)
>> and clicking on them, new content is pulled in contentJ div?
>>
>> Thanks a lot,
>> V
>>
>> --
>> View this message in context:
>>
> http://www.nabble.com/jQuery-Ajax-link-inside-container--how-to-make-this--tp20703903p20703903.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
>
--
View this message in context:
http://www.nabble.com/jQuery-Ajax-link-inside-container--how-to-make-this--tp20703903p20704281.html
Sent from the Zend Framework mailing list archive at Nabble.com.