hai guys am waiting didnt get any response so far...

please help me as i need to get this working..........................

my javascript file is as shown below

================================
 $(document).ready(function() {
>
>     var value =  $('.add-beer-link').attr('id');
>
>     alert(value);
>
>     $('#some-beer-name').click( function () {
>          $.post('http://localhost/jeffery/cake_1.2.3.8166/beers/view_beer',
> {name: "John" , id: value },
>                 function(RESPONSE, textStatus)
>                 {
>                     alert("Data submitted: " + RESPONSE);
>                 });
>    });
>
> });
================================

 and now when i reload my page and click on the link
>
> it gives me the following alert

=======================================
 Data submitted: Array
> (
>     [pass] => Array
>         (
>         )
>
>     [named] => Array
>         (
>         )
>
>     [controller] => beers
>     [action] => view_beer
>     [plugin] =>
>     [form] => Array
>         (
>             [name] => John
>             [id] => some-beer-name
>         )
>
>     [url] => Array
>         (
>             [url] => beers/view_beer
>         )
>
>     [isAjax] => 1
> )
> <script type="text/javascript"
> src="/jeffery/cake_1.2.3.8166/js/jquery-1.3.2.min.js"></script><script
> type="text/javascript"
> src="/jeffery/cake_1.2.3.8166/js/beers_view_beer.js"></script><a href="#"
> onclick="return false;" id="some-beer-name" class="add-beer-link">add
> beer</a><br/><br/><br/>pop=<!-- 0.7738s -->
=======================================
 and in my controller ie. in function view_beer()
>
> am trying to display the result as follows
>
> ==============================
> function view_beer()
>         {
>                 print_r($this->params);
>                 /*if($this->RequestHandler->isAjax())
>                    {
>                     print_r($this->params);
>                 }*/
>         }
> ==============================
>
> =>But its not showing the the result what i get here as output is
>
> ==================================
> Array ( [pass] => Array ( ) [named] => Array ( ) [controller] => beers
> [action] => view_beer [plugin] => [form] => Array ( ) [url] => Array ( [url]
> => beers/view_beer ) [isAjax] => )
> ==================================
>
> So i think the jquery alerts corectly but somehow its wrong in controller
>
> Is the function in controller wrong or is there something else that i should
> do to get
>
> the value displayed......
>
> expecting ur reply...............................................


--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to