On Dec 16, 2006, at 2:27 PM, José de Paula Eufrásio Júnior wrote:
> So, I guess everybody comes to that someday... > > I did some nice "onclick" and "onchange" and "onsomething" javascript > functions last night. They work great on Mozilla. IE don't even > returns an error. > > I started trying to figure out something on the code. Kid converts all > 'onclick" o "ONCLICK", but on a dummy html file, IE seems to be case > insensitive (as I said, I started testing everything). > One thing that didn't work was that in IE, if I put the javascript > function inside quotes "", it doesn't work (at least, the "alert" > function don't). > But Kid doesn't allow me to make a template with > onclick=function(param), it complains about malformed (x)html (and it > is, indeed). > > I searched the google oracle and seems that there's a lot more about > this event business between the browsers, mainly about using > javascript to setup event handlers instead of using the "onclick", > "onstuff". So, if anyone can point me some directions, I would be > grateful. You can use MochiKit's Signal module to set up event handlers. As a nice side effect your JS code and HTML and live in separate files so you don't end up mixing code and markup. http://mochikit.com/doc/html/MochiKit/Signal.html Alberto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

