I have a 'no properties error' (from Firefox's 1.5 javascript console)
on:
var position_pt = options[i].search(";") in the following segment of
code.
The strange thing is that I'm referencing the options[i] variable in
other lines of the code fine, and the code executes fine as well
(except for the error).
The code below is the function to process the results of a
XMLHttpRequest and is only called when:
// if the page has been successfully called by the browser
if (oHttp.readyState == 4) {
var asterisk_pos;
var options = oHttp.responseText.split(",");
for (i=0;i<=options.length;i++) {
// find the position of the semi_colon and then do a substring based
on that calculation
// seems to put out a javascript error for some reason this
var position_pt = options[i].search(";")
// put the name into a variable
var option_name = options[i].substr(position_pt+1)
// put the id into a variable
var option_id = options[i].substr(0, position_pt)
// write out the new options
sel_to_fill.options[i] = new Option(option_name, option_id);
// semi working one
//sel_to_fill.options[i] = new Option(options[i-1],options[i-1]);
}
}
I've tried numerous things but with no joy. Anyone got any ideas?