On 05/02/12 16:12, lkcl luke wrote: > thank you to rasiel for this one. > > http://code.google.com/p/pyjamas/issues/detail?id=661 > > ugh! new platform needed, at some point (IE8/9). this will do for now. > > could someone verify that this is also borked for pyjd (MSHTML) engine > when IE9 is installed? I'm puzzled about this because I've never seen this bug either in pyjs or pyjd on IE9. I've just created a test app for pyjd with a three-button radio group and it ran without any errors. A web deployed application which I built on Feb 4 also has working radio buttons. Another older application created 6 months ago doesn't show this error. P. it should be (borked, that is) because the > equivalent code (pure python) in DOM.mshtml.py is this: > > def createInputRadio(group): > return doc().createElement("<INPUT type='RADIO' name='" + group + "'>") > > which of course doesn't take into account the exact same problem (but > just in python) - see below. problem is i don't know where to get > userAgent from in MSHTML! probably best to do it as a try/except > block or something. > > l. > > bugfixed code: > > 48 def createInputRadio(group): > 49 JS(""" > 50 ua = navigator.userAgent.toLowerCase(); > 51 if (ua.indexOf('msie 9.0') != -1) { > 52 var elem = $doc.createElement("INPUT"); > 53 elem.type = 'radio'; > 54 elem.name = @{{group}}; > 55 return elem > 56 } > 57 > 58 return $doc.createElement("<INPUT type='RADIO' name='" + > @{{group}} + "'>"); > 59 """) >

