Prototype Form.Element.EventObserver in IE

L

laroygreen

Good day,

Not sure if this is a good place to put this, but I cant find a
prototype group.

I am trying to observe a form field with:

new Form.Element.EventObserver($("id_fk_app"), function(event){
GetAppId(); })

This works fine in Firefox, but does not work in IE 6 (complains about
expecting an object).

here is the GetAppId() function:

function GetAppId(){
var url = '/ticket/refresh_version/';
var pars = 'fk_app=' + $F('id_fk_app');

version = document.TicketForm.id_fk_version;
version.options.length = 0; //Remove previous options

var myAjax = new Ajax.Request( url, {
method: 'get',
parameters: pars,

onComplete: function(resp) {
var response_obj = eval ('(' + resp.responseText + ')');

response_obj = [response_obj]; //Create a list

$H(response_obj[0]).each(function(result){
i = version.length;
version.options= new Option( result.value,
result.key);
});

}
});
}

I am using:

script.aculo.us version 1.6.1
Prototype version 1.5.0_rc0 (I have tried prototype 1.4 with the same
errors)

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top