hello, Into my admin site I have some Selects (from foreignKeys) for which I'm able to add a "change" event so that when I choose an option from the Select's dropdown somethings happens to the other fields via an AJAX request. I'm doing this using djquery, directly into the <script> section of my template.html with something such as $("#id_selector").on('change', myFunction() {......}
Now I wanted to do the same using an "Autocomplete_field" widget but I'm not able to add any "on" event via jquery, it seems they are ignored even if they appear into the HTML source page. But if I add this "onchange" as an attribute of the field's widget (e.g. form.base_fields['myField'].widget.attrib['onchange']='myUpdateFieldsFunction()' ) then it works. Is this intended? Thanks, alaxa -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/263080237.970969.1551394056841%40mail.libero.it. For more options, visit https://groups.google.com/d/optout.