View Full Version : DomHelper.Template and UpdateManager

4 Jan 2007, 8:44 AM
I want to build a select box and options using JSON data returned from the server. I can successfully return the JSON data (as I can see it in FireBug) but I want to then build a select box with this data. e.g.

var el = getEl(objID);
var mgr = el.getUpdateManager();

users = {
"Joe Blogs Junior":{username :"Joe Blogs Junior",email:"jbjnr@jb.com"},
"Joe Blogs Senior":{username :"Joe Blogs Senior",email:"jbsnr@jb.com"}

<option value="jbjnr@jb.com">Joe Blogs Junior</option>
<option value="jbsnr@jb.com">Joe Blogs Senior</option>

What is the best way to achieve this ?
Should I use a template ? If so, how is it constructed?
How do I get the data from the update manager into the template ?