Index: contrib/admin/templates/admin/prepopulated_fields_js.html
===================================================================
--- contrib/admin/templates/admin/prepopulated_fields_js.html	(revision 9050)
+++ contrib/admin/templates/admin/prepopulated_fields_js.html	(working copy)
@@ -1,11 +1,13 @@
 <script type="text/javascript">
-{% for field in prepopulated_fields %}
+    {% for field in prepopulated_fields %}
     document.getElementById("{{ field.field.auto_id }}").onchange = function() { this._changed = true; };
     {% for dependency in field.dependencies %}
-    document.getElementById("{{ dependency.auto_id }}").onkeyup = function() {
-        var e = document.getElementById("{{ field.field.auto_id }}");
-        if (!e._changed) { e.value = URLify({% for innerdep in field.dependencies %}document.getElementById("{{ innerdep.auto_id }}").value{% if not forloop.last %} + ' ' + {% endif %}{% endfor %}, {{ field.field.field.max_length|default_if_none:"50" }}); }
+document.getElementById("{{ dependency.auto_id }}").{% if dependency.field.choices %}onchange{% else %}onkeyup{% endif %} = function() {
+    var e = document.getElementById("{{ field.field.auto_id }}");
+    if (!e._changed) {
+        e.value = URLify({% for innerdep in field.dependencies %}{% if innerdep.field.choices %}document.getElementById("{{ innerdep.auto_id }}").options[document.getElementById("{{ innerdep.auto_id }}").selectedIndex].text{% else %}document.getElementById("{{ innerdep.auto_id }}").value{% endif %}{% if not forloop.last %} + ' ' + {% endif %}{% endfor %}, {{ field.field.field.max_length|default_if_none:"50" }});
     }
+}
     {% endfor %}
 {% endfor %}
 </script>
