From: Doug on 12 Aug 2010 09:49 I'm using elementtree to create a form. I would like to set the "selected" attribute. Setting using the usual option.set( "selected" = "" ) gives me <option selected="" value="operations">Operations</option> how does one make <option selected value="operations">Operations</option> which is what I need.
From: Peter Otten on 12 Aug 2010 10:47 Doug wrote: > I'm using elementtree to create a form. > > I would like to set the "selected" attribute. > > Setting using the usual > option.set( "selected" = "" ) Maybe that should be option.set(selected="selected"). I think <option selected="selected"> and <option selected> are equivalent. http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3.4.2 > gives me > <option selected="" value="operations">Operations</option> > how does one make > <option selected value="operations">Operations</option> > which is what I need.
From: Doug on 12 Aug 2010 10:55 On Aug 12, 10:47 am, Peter Otten <__pete...(a)web.de> wrote: > Doug wrote: > > I'm using elementtree to create a form. > > > I would like to set the "selected" attribute. > > > Setting using the usual > > option.set( "selected" = "" ) > > Maybe that should be option.set(selected="selected"). I think > > <option selected="selected"> > > and > > <option selected> > > are equivalent. > > http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3.4.2 > > > > > gives me > > <option selected="" value="operations">Operations</option> > > how does one make > > <option selected value="operations">Operations</option> > > which is what I need. Makes sense to me. Thanks!
|
Pages: 1 Prev: __class__ of what Next: Announcing: python-ghostscript 0.3 |