Hello all,

I am working on this form (http://www.datamt.org/vornado/test.htm) and
everything works fine in IE, but in FF it does not.

What is supposed to happen is you select an item from the drop down
and it auto generates the description for you.  You can also click Add
An Item button to add a new row to the table, so you can create a new
item.

In FF creating the new row works fine, but whenever the drop menu is
changed, FF gives the following error:

Error: document.getElementById(yDesc) has no properties
Source File: file:///F:/Alan%20Wicks/data3.js
Line: 355

the function that contains line 355 is as follows:

function getDescription(dList,xNum){
var yDesc;
yDesc = 'itemDesc' + xNum;
if (dList == ""){
document.getElementById(yDesc).value = "";
}
else {
document.getElementById(yDesc).value = descriptionList[dList];
}
}

the element is a select box, and is not created with HTML, but is
created using the .append feature.
        $('table#items')
                .append(newItem);
                document.getElementById('numItems').value = x;


I'm assuming the problem is that FF doesn't recognize elements that
are created outside of the HTML?

Any help would be greatly appreciated.

I'm using LiveQuery to add the table row.  newItem is the variable
name of the row.  Below is how it is defined:

        var newItem;
                newItem = '<tr><td style="text-align: center;">';
                newItem = newItem + '<select name="item' + x + '"
onchange="getDescription(this.value,'+x+');">';
                newItem = newItem + '<option value="" selected="selected">Please
Select An Item<\/option>';
                newItem = newItem + getOptions();
                newItem = newItem + '<\/select></td>';
                newItem = newItem + '<td><input name="itemDesc' + x + '" 
size="70" /
></td>';
                newItem = newItem + '<td><input name="qty' + x + '" size="5" 
/></
td>';
                newItem = newItem + '</tr>';

Thanks,
Johnie Karr

Reply via email to