Well, conciseness is always good. I haven't looked at (and don't have time to look at) the code that inserts this stuff, so I'll take your word for it that it's a big undertaking. Lord knows, I don't have time, so I'm certainly not complaining.
But we've got a desideratum, anyway. Maybe down the road someone will have time to look at it. Thanks for the clarification! Chas. marius d. wrote: > > > On Sep 13, 8:00 pm, "Charles F. Munat" <c...@munat.com> wrote: >> marius d. wrote: >>> I'm thinking that instead of: >>> <button onclick="liftAjax.lift_ajaxHandler >>> ('F1029758482780OTA=true',null, null, null); return false;">Press me</ >>> button> >>> We could have: >>> <button onclick="liftAjax('F1029758482780OTA')">Press me</button> >> This is not what I had in mind at all. You still have the event handler >> in the HTML. The idea, I thought, was to attach the event handler from >> an external file using the id (or class) of the button element. > > I understand that but this is a bit impractical because lift would > have to generate artificial ID-s OR id-s could be tampered with or > other JS libraries may generate their own ID-s etc. Selectors by class > is also a little impractical from a framework standpoint. Also we'd > have to add code for each underlying JS library (JQuery, YUI etc). > This would require IMHO significant code to write and not a > significant gain. But I'd love to prove me wrong. > >> Maybe I'm living on a different planet (a distinct possibility and one >> I've been giving much thought to recently), but virtually every JS >> programmer I know considers this a best practice, and it has been >> considered so for many years. > > I know this is practical from applications perspective when writing > specific JS etc. but from a framework perspective, this is not. > >> Frankly, and maybe I'm just a bit dull, but I can't conceive of what the >> advantage to the above change might be. What am I missing? > > I'm not 100% buying any proposal so far ... as I explained above the > disadvantages as we replace a JS expression with another JS function > call. It just adds a bit of conciseness .. nothing more. > >> Chas. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---