[thelist] Form generated in JS doesn't work in IE

Chris Price chris.price at choctaw.co.uk
Thu May 29 03:00:07 CDT 2008

Ken Snyder wrote:
> Chris Price wrote:
>> ...
>> http://choctaw.co.uk/clients/test/
>> Thanks
> The debugger says that "this" is not defined from within the getPrice 
> function.  Try adding the onsubmit function with this code instead:
> myForm.onsubmit = function() {
>   // run the getPrice function in the context of myForm
>   // so that within the getPrice function "this" refers to myForm
>   getPrice.apply(myForm);
> }
The anonymous function makes no difference.

If I add /myForm.myWidth = '2000'/ then test /this.myWidth/ in the 
/getPage/ function it returns '2000'.

The problem appears to be in the name attribute.

If /<select name='myWidth'><option value='2000'>/ is hard coded then 
/this.myWidth.value/ returns '2000' on submit
but if its added using /createElement('select')/ it returns null.
I've tried adding a hidden field but that doesn't work either so its not 
select, specifically, that's the problem.

Kind Regards

  Chris Price

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