[thelist] Form generated in JS doesn't work in IE
Chris Price
chris.price at choctaw.co.uk
Wed May 28 10:03:29 CDT 2008
I have a form generated in javascript which works fine in FF but refuses
to work in IE.
I've checked the dom (in IE) and everything appears to be there but on
submit I get 'this.width.value is null or not an object'.
I'm using 2 selects to work out a price from a matrix.
This is the code that creates the selects and gets the results:
myForm.onsubmit = getPrice;
}
})
function getPrice() {
var myWidth = this.width.value;
var myHeight = this.height.value;
var myDiv = document.getElementById('showprice');
var myPrice = window.priceArray[myHeight][myWidth];
myDiv.firstChild.nodeValue = '£' + myPrice;
return false;
}
function getWidth() {
var mySelect = document.createElement('select');
mySelect.setAttribute('NAME','width');
myArray = window.widthArray;
for (i in myArray) {
var myOption = document.createElement('option');
myOption.setAttribute('VALUE',i);
myOption.appendChild(document.createTextNode(myArray[i]));
mySelect.appendChild(myOption);
}
return mySelect;
}
function getHeight() {
var mySelect = document.createElement('select');
mySelect.setAttribute('NAME','height');
var myArray = window.priceArray;
for (i in myArray) {
var myOption = document.createElement('option');
myOption.setAttribute('VALUE',i);
myOption.appendChild(document.createTextNode(i));
mySelect.appendChild(myOption);
}
return mySelect;
}
Hope someone can shed some light on this.
--
Kind Regards
Chris Price
Choctaw
chris.price at choctaw.co.uk <mailto:chris.price at choctaw.co.uk>
www.choctaw.co.uk <http://www.choctaw.co.uk>
Tel. 01524 825 245
Mob. 0777 451 4488
Beauty is in the Eye of the Beholder while
Excellence is in the Hand of the Professional
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Sent on behalf of Choctaw Media Ltd <<
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Choctaw Media Limited is a company registered in
England and Wales with company number 04627649
Registered Office: Lonsdale Partners, Priory Close,
St Mary's Gate, Lancaster LA1 1XB . United Kingdom
More information about the thelist
mailing list