I want to set the value of an option in a select widget to '' (empty string). Initially I was trying to set it to null which it didn't like either, I tracked that down to the Option DOM function converting it to an empty string which is apparently the default if you don't specify a value.
So anyway where it falls over is in widget.js Widget.select.load line 217 where it tests for the existence of opt.value (Widget.exists line 5). opt.value isn't undefined but val equates to false causing the value to be set to opt which then gives [object Object]. If the else statement of the ?: expression is changed from opt to '' it appeases me but I guess the original code is there for a reason (probably so that options can be a straight array of values that are also used as the labels. I can also see why Widget.exists is the way it is. I could just change my code but guess others may want a case of '' too. Apologies about the long post about such a small piece of code. I was just going to suggest my fix but started to think about it in a bit more depth. If it makes it better and anyone is interested I'm working on a TurboTunes meets IMMS app (just for fun and to learn TG). -andy -- Andy Kilner <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part

