Hi byrd48,
Of course, you can always define an external function and pass it
later as an handler:
var myExternalFunction = function(draggable, event) {
// do your stuff for onEnd
// you can use draggable and event objects
}
Also, to be sure that your external function is loaded from the
included js file, be sure to put the draggable declaration in the
window onload event:
Event.observe(window, 'load', function( ){
new Draggable('id_of_draggable', {
onEnd: myExternalFunction
});
});
-Larry
On Sep 9, 10:48 pm, byrd48 <[EMAIL PROTECTED]> wrote:
> Hi, I would like to use the OnEnd event of the draggable to call an
> external function instead of putting it inline. The function itself
> will be probably 30-50 lines long and will be unwieldy inline. I
> prefer the function to reside in a js include page for easier
> debugging with FireBug. Is there a way to make an external function
> call with the OnEnd event? Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---