Hi,
To achieve that, we listen to the change event of said select (to call the JS function when it is fired), which works fine when the user clicks a value directly in the drop-down menu proposed by the select.
Sadly, when this select is populated through the Admin Popup functionality (the process that starts by clicking the green plus icon to open a popup window, and that completes when the user click the save button on the popup window), it seems that the change event is not fired for the select, as our callback is not executed, even though the selected value is actually changed.
Is there another event we can listen to to get the same behaviour than when the user clicks a value directly from the list ? Or any other method to call our JS function when the select value is set through the popup completion ?
-- We are developing an application that relies on dynamic admin pages (based on some custom ajax). The high level idea is that, when the user changes the value in a select html element that is mapped to a ForeignKey on another model, we call a JS function (which triggers an asynchronous request that changes the current admin form on completion).
To achieve that, we listen to the change event of said select (to call the JS function when it is fired), which works fine when the user clicks a value directly in the drop-down menu proposed by the select.
Sadly, when this select is populated through the Admin Popup functionality (the process that starts by clicking the green plus icon to open a popup window, and that completes when the user click the save button on the popup window), it seems that the change event is not fired for the select, as our callback is not executed, even though the selected value is actually changed.
Is there another event we can listen to to get the same behaviour than when the user clicks a value directly from the list ? Or any other method to call our JS function when the select value is set through the popup completion ?
Thank you for reading,
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/05ecf964-43a4-418f-88a7-470e99d24ae6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment