hey guys,
Sorry but I just cannot get my head around this one. I am trying to
pass back a value from jquery to my controller. Everything runs ok,
except my controller does not get or doesn't recognize the value I am
passing it via jquery.
//here is my javascript
$(document).ready(function(){
$("#votebox").click(function(){
$(this).load("/stories/vote/" + $idof);
})
//Here I have already checked, $idof contains a value of 3, so should
the controller that is being requested look like /stories/vote/3 ? Or
am I missing something. I already asked the guys over at jquery and
they said syntactically correct, and that it is something wrong on my
end, so it must be cake.
Any help is greatly appreciated.
My function looks like this btw, and accepts an id, which it is not
recognized
function vote($id){
$this->Story->id = $id;
$count = $this->Story->field('Story.agree');
$newcount = $count + 1;
$this->data['agree'] = $newcount;
$this->Story->save($this->data);
}
Thanks again
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---