Thanz again
Dr. Lobotoso now i understood what u was referring to........
and now i changed my javascript files as follows
===================================
$(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...............................................
(¨`•.•´¨) I may be busy,
`•.¸(¨`•.•´¨) but I assure you,
(¨`•.•´¨)¸.•´ you are always in my heart
`•.¸.•´
With Lots of Love.....
THANKS AND REGARDS
Jeffery Jacob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---