cyberco wrote: > Thanks for the pointer, but how can I add a parameter to the textarea > formfield, such as: > > ============================================== > <textarea cols="20" rows="2" value="" name="test" id="test" > onkeyup="textLimit(this.form.test, 40);"></textarea> > ============================================== > > if these formfields are automagically generated by Django? >
well, one of the ways is to connect the event-handler later. with Mochikit, you would do something like: (either in onload, or simply "after" the textarea in the html) ================ function textlimit(event) { //do the check here } connect('test','onkeyup',textlimit); ================ i assume it can be similarly in other javascript frameworks (or check the source-code of Mochikit how to do it in "raw" javascript.. i assume Mochikit is doing it with DOM-manipulation). gabor --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---