Hi,
I found it's rather painful to build the UI for author mode, especially when I need to align the controls, or many fancy stuffs.
Currently, I am using the method that I think the most simple one that I know:
p_elSource.innerHTML = "<table style='width:100%'><tr><td>Url</td><td style='width:100%'><input id='myInput' value=''></td><tr></table>";
var myInput = document.getElementById('myInput');
Above is the simple one but there is a problem here: getElementById is not a good approach as some people mention (especially when add 2 same gadget on the web page). And I also encountered some problem in sizing.
Can you share your experience to build a robust UI but less painful
Thanks,
Bao Nguyen

What is the best way to implement the UI for author mode
sachin kumar rana
A couple things:
Styling a form is very much trial and error, but with proper CSS massaging you should be able to get something that still looks good. You might have to compromise on your design sometimes, since HTML was never meant to be pixel-perfect. HTML should flow and resize, and that can cause some good-looking fixed designs to look really bad when font size or dimensions are changed.
Rob Duffy
Gadget.xml is the way to "include" js files. If your helper functions are in different namespaces, you'll need to register all namespaces you want to access. For example take a look at http://download.gallery.start.com/d.dll/1~1~822~9548/soapboxvert.js. At the top of the file, I register two namespaces, ToddOs.SoapBoxVert and ToddOs.Utils. Within that file, all of my classes are defined inside of ToddOs.SoapboxVert, but I need the second namespace declaration because I'm using utilities from http://download.gallery.start.com/d.dll/1~1~822~9548/utils.js. In utils.js, I only register one namespace (ToddOs.Utils), because I'm not referencing back to classes in the ToddOs.SoapBoxVert namespace.
If your helper methods are not in a namespace, then shame on you! But in that case, they should still work. Depending on how you defined your helpers, you might need to instantiate a class to have access to class methods (ie, you can't call "foo.bar();" until you've first done "var foo = new Foo();" because bar() is a method on the Foo class).
sugrhigh
Thanks ToddOs,
You are helpful as usual. I certainly check it out.
By the way, I have another question regarding the code organization:
I have my main Bao.js file which will implement my gadget. I also wrote some library so I can reuse in Bao.js, let's call them: A.js, B.js.
How to link these *.js files I have put: <item><link>...A.js</link></item><item><link>...B.js</link></item> in the gadget.xml but in Bao.js still can not use those because of undefined.
Thanks,
Bao Nguyen