Grow your CSS skills. Land your dream job.

How to place a Dijit Combobox inside a specific contentpane using javascript

  • # May 17, 2012 at 9:28 am

    i am trying to create a dataStore to populate a combobox, everything seems to work fine, but my combobox does not show up at the place where i want, actually it does not show up anywhere.

    i am trying something like this.

    //this is the content pane where i want the combobox

    var tab = new dijit.layout.ContentPane({
    title: "tab",
    style:"width:100%; height:500px",
    content: "Here goes the comobox",



    });

    tab_container.addChild(tab);

    // this is the combobox and store created

    Types = function() {

    dojo.xhrGet
    ({url:"json/types.json",
    handleAs: "json",
    load: function(types, details) {
    PropertyMap.TypeStore = new dojo.data.ItemFileReadStore({
    data : {
    identifier: 'id',
    label: 'display',
    items : types
    }
    });
    },
    error: function(error_msg, details) {
    content.handleError(error_msg, details);
    }});
    };

    XXX.createPlaceTypeStore = function(types) {



    var PlaceTypeStore = new dojo.data.ItemFileReadStore({
    data:{
    identifier:"id",
    label:"display",
    items:types
    }
    });

    var combo_box = new dijit.form.ComboBox({
    name : "options",
    placeHolder:"options place",
    value:"",
    store: PlaceTypeStore,
    searchAttr:"display"
    });

    combo_box.placeAt("tab");



    // i am getting this error
    refNode is null
    [Break On This Error]

    if(has("dojo-combo-api")){
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".