CakePHP & jQuery Issues

2008-04-21 Thread wizardElite

As a relative noob to the realm of jQuery and Ajax. I've been beating
my head into a brick wall trying to figure out a problem I'm having.

I have a simple checkbox within a view

checkbox('Request/review_id', null, 
array('1'=>
'Ready', 'class' => 'review'));
?>


I want jQuery to capture both the Request id and the Review id via
Ajax
$(document).ready(function() {
//ADD ONCLICK HANDLER TO CHECKBOX WITH class
$("input:checkbox").click(function() {
//var value = $(this).val(); //VALUE OF CHECKBOX

if ($('.review').attr('checked')) {//CONFIRM IF CHECKED
$.post('/permits/permits/setReview', {//SEND POST MSG 
setReview
method not receiving value. STUCK HERE
id : "data[Request][id]",
name : "data[Request][review_id]",
}, function(msg) {
alert("Value is: " + msg);//RETURN MESSGAGE
});
}

});
});

Then take that information and pass it to a controller
  function setReview(){
if(empty($this->data)){
$r = $this->data['Request']['review_id'];

$this->Request->id = $this->data['Request']['id'];
$this->Request->saveField('review_id', $r);
$this->set('ready', $r);
}
  }

Simple concept that isn't working.  I keep getting undefined values
every time I make the Ajax call.

Any suggestions are greatly appreciated.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: IBM Cooking Websites Fast Series Part 2 Problem

2008-02-21 Thread wizardElite

Thank you so much. It finally works.

On Feb 20, 9:13 am, hugsnothugs <[EMAIL PROTECTED]> wrote:
> thanks pizaninja, I think I tripped over a solution as well --
> updating to the nightly and using "cake acl create aro 0 Users 0"
> six of one half-a-dozen of the other as my old man says.
>
> On Feb 20, 3:05 am, pizaninja <[EMAIL PROTECTED]> wrote:
>
> > I've found the solution here 
> > :http://groups.google.com/group/tickets-cakephp/browse_thread/thread/1...
>
> > On line 29 of dbo_source.php, add or change by  :
> > uses('set', 'string');
>
> > It works well for me.
>
> > On 20 fév, 09:48, pizaninja <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > >    I've exactly the same problem. It must be a bug from cakephp...
> > >    My version : cake_1.2.0.6311-beta
>
> > > On 17 fév, 03:01, wizardElite <[EMAIL PROTECTED]> wrote:
>
> > > > In Part 2 of theIBMCakePHP series I'm having problems working with
> > > > Access Control Lists.
>
> > > > I've created theACLtables and I'm stuck at defining defining groups
>
> > > > In my app directory the tutorial states within the terminal define
> > > > your groups with the following code.
>
> > > > phpacl.phpcreatearo 0 null Users
> > > > phpacl.phpcreatearo 0 null Dealers
>
> > > > When I do this I get the following response...
>
> > > > Couldnotopen input file:acl.php
>
> > > > After some research I tried this...
>
> > > > ../cake/console/cakeaclcreatearo / Users
>
> > > > I then receive the following message...
>
> > > > Fatal error:Class'String'notfoundin /Users/wizardelite/Sites/
> > > > ibmcake/cake/libs/model/datasources/dbo_source.php on line1455
>
> > > > Can anyone help me with this?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



IBM Cooking Websites Fast Series Part 2 Problem

2008-02-16 Thread wizardElite

In Part 2 of the IBM CakePHP series I'm having problems working with
Access Control Lists.

I've created the ACL tables and I'm stuck at defining defining groups

In my app directory the tutorial states within the terminal define
your groups with the following code.

php acl.php create aro 0 null Users
php acl.php create aro 0 null Dealers

When I do this I get the following response...

Could not open input file: acl.php

After some research I tried this...

../cake/console/cake acl create aro / Users

I then receive the following message...

Fatal error: Class 'String' not found in /Users/wizardelite/Sites/
ibmcake/cake/libs/model/datasources/dbo_source.php on line 1455


Can anyone help me with this?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---