Hi,

At my application i have ben working quiete fine but when i tested my app, i 
saw that there is a problem about the function i am onlloading at the body 
part. 

So i have something as below:

<body onload="loadEventHandlers()">

This function is adding an onchange event to a form element (a select indeed). 
When i select something from the drop box another select box is being updated. 
The code is working on Firefox but when i tested with IE, i realized it is not 
working. 

I tried also by writing pure xmlHTTP requests and functions by thinking the 
protoculous is not suitable with IE, but it it didn't work either. 

So loadEventHandlers is never activating the update function defined in it. The 
code is as below:

function updateDepartment(facultyname) {
                if (facultyname!= '') {
                new Ajax.Updater(
                document.getElementById("{{ form.department.auto_id }}"),
                 'someurl/' + facultyname,
                 {method:'get'});
                 }
            }

             function loadEventHandlers() {
                 document.getElementById("{{ form.faculty.auto_id }}").onchange 
=
                     function () {
                         
updateDepartment(this.options[this.selectedIndex].value);
                         //test(this.options[this.selectedIndex].value);
                //         alert("ok");
                         };
             }

So is there a restriction using onload functions at templates at Django?

Or should it normaly work but am i doing something wrong?
-- 
Oguz Yarimtepe <comp....@gmail.com>

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to