I am using an inplace editor and need to add to the url in the js
Where
$(function() { 
    $('.edit').editable('/memos/mynote/',   {
         id        : 'edit_data[Post][key]',
         name      : 'data[Memo][note]',
         type      : 'text',
         cancel    : 'Cancel',
         submit    : 'Save',
                 indicator : '<img
src="/app/webroot/css/images/spinner.gif">',
         tooltip   : 'Click to edit the title'
    });
});

I need 
$('.edit').editable('/memos/mynote/65489',   { 

Or another way to get the ID of the post to the mynote function?

Thanks,

Dave

-----Original Message-----
From: brian [mailto:[email protected]] 
Sent: May-08-09 6:13 PM
To: [email protected]
Subject: Re: Pass variable to jQuery


I usually use rel for just this purpose when it's a link. However, a div
cannot have a rel attribute.

I'm sure there's still a better way to do this for this case.

On Fri, May 8, 2009 at 4:28 PM, mbavio <[email protected]> wrote:
>
> Why not to create html attributes (like rel) that can be then 
> extracted by the dom parser that jQuery has? I read this techinque 
> somewhere, I cant remember where...
>
> On May 8, 10:16 am, brian <[email protected]> wrote:
>> On Thu, May 7, 2009 at 2:45 PM, Dave Maharaj :: WidePixels.com
>>
>> <[email protected]> wrote:
>>
>> > Right thanks,
>>
>> > Going to test it out, try the first example first.
>>
>> > Where do I put the codeblock you have? MVC?
>>
>> In the view.
> >
>



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to