Re: drag id in dropRemote

2006-12-17 Thread Gustoph

Hey way to go mate, that worked like a charm. I figured the 'with'
option was probably needed but I hadn't realised that you could use
'element.id' to retrieve the information.
thanks tonnes!


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



Re: Re: drag id in dropRemote

2006-12-13 Thread Samuel DeVore

Here is my code

e($ajax->dropRemote('sidebar',null,
array('url'=>'/portfolios/remoteSelect',
'update'=>'sidebar',
'with'=>"'data[Image][id]=' + encodeURIComponent(element.id)",
'complete'=>"new Effect.Highlight('sidebar');")));

The key here is the 'with' statement

does that help?

On 12/13/06, Gustoph <[EMAIL PROTECTED]> wrote:
>
> I have a similar problem and I've struggled to find any examples or
> info either. The Rails example (http://demo.script.aculo.us/shop) seems
> to get the DOM id of the dropped element by reading the params array in
> the controller.
> This doesn't work in cake. So I'm still stuck trying to read the id
> when dropped onto a div enhanced with dropRemote.
>
>
> naryga, have you been able to at least get the id of the dropped
> element into your controller?
>
> Can anyone else help?
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

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



Re: drag id in dropRemote

2006-12-13 Thread Gustoph

I have a similar problem and I've struggled to find any examples or
info either. The Rails example (http://demo.script.aculo.us/shop) seems
to get the DOM id of the dropped element by reading the params array in
the controller.
This doesn't work in cake. So I'm still stuck trying to read the id
when dropped onto a div enhanced with dropRemote.


naryga, have you been able to at least get the id of the dropped
element into your controller?

Can anyone else help?


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



drag id in dropRemote

2006-10-17 Thread naryga

I have a div with id="albumCover".  I'm using $ajax->dropRemote() to
turn it into a drop zone that calls a Controller method.  It only
responds when an image with the class="draggers" is dropped on it.
I've got that part down just fine.  My problem is that the method it is
calling needs to know some information about the draggable image that
is dropped on it.  How can I pass that information on the the
controller method?  I'm using the class of the draggable images instead
of individual id's because the images are generated dynamically and I
don't know what the id's will be ahead of time.  Specifically, I need
to send along the dragged image's new x and y coordinates.  I've been
using top and left so far.  Any assistance is greatly appreciated!


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