Without looking at the code, the example would be clearer if it said "Red Car" for the "Red" option, and "Blue Car" for the "Blue" option. It would also be clearer if it mentioned somewhere that I was picking the color of a "Car". ;-)
Before any changes: * In Mozilla Firefox 0.9 and Opera 7.50, I get "Blue Car" for "Red" option, and nothing for "Blue" option. * In IE 6, I get "Red Car" for "Red" option, and nothing for "Blue" option. I made the suggested changes, and added a listener for "optblue". After the changes: * Mozilla Firefox 0.9, Opera 7.50 and IE 6 work correctly; alerted colors correspond to button labels. I'll go ahead and submit these changes to CVS. Leif ----- Original Message ----- From: "Andrew Gillett" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 16, 2004 2:19 AM Subject: [Dynapi-Dev] Bug in htmlradiobutton.js > Hi, > > I recently tried using the HTMLRadioButton widget and found that while > it worked under IE6, it was quite broken on Mozilla/Firebird. > > If you look at the example, > dynapi3x/examples/dynapi.gui.htmlradiobutton.html, when you click on the > "Red" radio button you'll get an popup that says "Red Car" on IE but > says "Blue Car" on Mozilla. It should say "Red Car" on both. > > A quick look at the constructor for this class shows on line 15: > this._elmId = elmName||('Radio_'+this._group); > The "elmName" is not supplied to the constructor (at least in the > example), and given that the element id should always be unique, I have > changed the line to: > this._elmId = elmName||(this.id+'Radio'); > - this is similar to what is in htmlcheckbox.js. > > And on line 65, I changed the name of the radio button group from > "this._elmId" to "this._group": > return '<input type="radio" ... +'" name="'+this._elmId+ ... > becomes: > return '<input type="radio" ... +'" name="'+this._group+' ... > > > This change seems to work quite well on both IE and Mozilla, so if there > is a committer out there who is willing to commit this fix, that would > be good. > > > Andrew. > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > Dynapi-Dev mailing list > [EMAIL PROTECTED] > http://www.mail-archive.com/[EMAIL PROTECTED]/ > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/