PDA

View Full Version : DOMHelper in IE?



kjordan
29 Jan 2007, 7:35 AM
I'm having a bug in IE where the intial tag doesn't seem to be put into the DOM. I.E. I get:

Not Shipping</option>Carton 1</option>
instead of:

<option value='Not Shipping'>Not Shipping</option><option value='Carton 1'>Carton 1</option>
Here's the code ('cartonnum' is a select):

var maxnum = parseInt($('numberofcartons').dom.value);
if (maxnum != NaN && maxnum > 0) {
alert($('cartonnum').dom.innerHTML);
YEDH.overwrite('cartonnum',{tag: 'option',html:'Not Shipping',value:'Not Shipping'});
alert($('cartonnum').dom.innerHTML);
for (i = 1; i <= maxnum; i++) {
YEDH.append('cartonnum',{tag: 'option',html:'Carton '+i,value:'Carton '+i});
}
alert($('cartonnum').dom.innerHTML);
var datamodel = PartGrid.grid.getDataModel();
for (i = 0; i < datamodel.getRowCount(); i++) {
var carton = datamodel.getValueAt(i,5);
if (carton != "Not Shipping") {
var carton_array = carton.split(" ");
var cartonnum = parseInt(carton_array[1]);
if (cartonnum > maxnum) {
datamodel.setValueAt('Not Shipping',i,5);
}
}
}
}

tryanDLS
29 Jan 2007, 7:38 AM
Please read/search existing posts before starting a new thread. This thread is from the last few days
http://www.yui-ext.com/forum/viewtopic.php?t=2370

kjordan
29 Jan 2007, 7:40 AM
Please read/search existing posts before starting a new thread. This thread is from the last few days
http://www.yui-ext.com/forum/viewtopic.php?t=2370
Ah, guess I didn't enter the right search terms, because that didn't show up when I did.