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
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