It looks like the best approach to implement this is to attach an onchange handler to the leading and trailing shuttle lists. In this way, I don't have to worry about what changed either the leading or trailing list---shuttle "button" or something else, I just react to the change to the list itself, the event I'm actually most interested in.

This seems to work quite well in practice for the problem I was trying to solve as described below, since I don't have to change the handler code of the shuttle buttons and since the shuttle lists do actually have generated IDs associated with them. In addition, if I ever add a new manipulator of either the leading or trailing list, the event will be picked up any time this manipulator changes either list without having to change anything in the handler code.

                                               -=> Gregg <=-

Gregg Leichtman wrote:
Let me provide a little more info as a motivation for an answer. I
realize that I could use PPR to allow changes to the page to occur
without having to overload the shuttle button functionality; however,
I'm trying to avoid the client/server round trip for one thing. Another
issue; however, is that I also want the user to be able to modify an
animated _javascript_ object within the page from within the browser so
that they can see the effect of their changes _before_ they have to
commit their final changes which will, in turn, cause an immediate
site-wide change, since this object is displayed on every page of the
site. Changes to the shuttle list items will affect this animated
object, so I need control over the shuttle buttons so that I can react
immediately within the browser to user changes.

Given this, is the approach that I describe below the only one available
to me?

                                                                     -=>
Gregg <=-

Gregg Leichtman wrote:
  
I looked in the forum archive and didn't see anything pertinent to this
question.

Is there a recommended way to replace the _javascript_ functionality of
the shuttle buttons such as move, remove, move up, move down, etc.? I
see that these "buttons" are generated as anchor href's using _javascript_
bookmarklets, but there is no generated HTML ID or name associated with
the buttons and the only way that I can see to modify the generated
_javascript_ code is to track down the link tag using the unique button
text, which is a fragile way to do this of course, and then replace the
href handler with my own bookmarklet handler.

I want to do this, because I need to trigger additional _javascript_
functionality when the user clicks these buttons.

                                                   -=> Gregg <=-


  
    

  

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to