[Dojo-interest] Firefox Combobox width
mengel at notes.cc.sunysb.edu
mengel at notes.cc.sunysb.edu
Thu Feb 8 07:43:31 MST 2007
I answered it myself. Posting answer for future searches.
This sets the width for comboBoxes in IE and has been tested in FireFox:
var cbBuildCd = dojo.widget.createWidget('combobox', { widgetId:
'cbBuildCd'});
cbBuildCd.textInputNode.style.width=60; // (px)
I has to add 'style' to the call to make it compatible with the browsers.
Apparently IE assumes the style. I wish they would standardize these
types of things.
Thanks,
Matthew Engel
Senior Programmer/Analyst
State University of New York at Stony Brook
mengel at notes.cc.sunysb.edu
mengel at notes.cc.sunysb.edu
Sent by: dojo-interest-bounces at dojotoolkit.org
02/07/2007 04:16 PM
Please respond to
dojo-interest at dojotoolkit.org
To
dojo-interest at dojotoolkit.org
cc
Subject
[Dojo-interest] Firefox Combobox width
I was creating my page for IE. I had some nice comboboxes that worked
very well. I was setting the with using:
cbBuildCd.textInputNode.width=60;
and it worked very well. I'm now starting a migration to Firefox. All is
working, except I can't change the width of the combobox anymore. Any
ideas? Here's a snippet.
var dataJSON = dojo.json.evalJson(data);
var buildCdcbDiv = document.getElementById("divBuildCd");
var buildNmcbDiv = document.getElementById("divBuildNm");
var cbBuildCd = dojo.widget.createWidget('combobox', { widgetId:
'cbBuildCd'});
cbBuildCd.textInputNode.width=60;
var cbBuildNm = dojo.widget.createWidget('combobox', { widgetId:
'cbBuildNm'} );
cbBuildNm.textInputNode.width=150;
cbBuildCd.dataProvider.setData(dataJSON.buildID);
cbBuildNm.dataProvider.setData(dataJSON.buildName);
buildNmcbDiv.appendChild(cbBuildNm.domNode);
buildCdcbDiv.appendChild(cbBuildCd.domNode);
cbBuildCd.onValueChanged = myApp.buildCdChanged;
cbBuildNm.onValueChanged = myApp.buildNmChanged;
Again, This worked great on IE, and made the comboboxes the correct width.
Thanks, in advance.
Matthew Engel
Senior Programmer/Analyst
State University of New York at Stony Brook
mengel at notes.cc.sunysb.edu_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
Dojo-interest at dojotoolkit.org
http://dojotoolkit.org/mailman/listinfo/dojo-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20070208/3a632aad/attachment-0001.html
More information about the Dojo-interest
mailing list