Login Register

markup

GFX: Creating surface from existing SVG markup

Is it possible to create a surface from an existing SVG markup received via AJAX from the server? I have no problem creating and initializing SVG document via .load() like it is described in http://www.quirksmode.org/dom/importxml.html, though the problem is to somehow display this document in client's browser. Ideally, on IE, that document should be interpreted as VML.

Dynamically adding items to FilteringSelect

Hello all,

I have a FilteringSelect which I have created from markup like so

<select dojoType="dijit.form.FilteringSelect" id="cmb1">
        <option value="1">aaa</option>
        <option value="2">bbb</option>
        <option value="3">ccc</option>
</select>

and now I want to add an Item dynamically to this list on the click of a button. I have tried the following.

var combo = dijit.byId("cmb1");
combo.store.newItem({text:"ddd", value:"4"}, null);

but I get the error "combo.store.newItem is not a function" in firebug.

How do I get a ref to a store I declaratively instantiated??? byJsId, byId, byFunction, byMagic???


function init()
{	
    // how do you get a ref to the paletteStore here?
}

dojo.addOnLoad(init);





How do I use markup to create my custom widget and put a dojo widget as its contents also using markup using dojoTypes

I wanted to load a container widget in my custom widget but do it all in markup. How would you do that? I figured seeing this isn't specific on a dijit that this would be the right place to post this. If it's not, I'm sorry.

Event handlers via markup: shorthand way to get onClick="dijit.byId('${id}')....

When I use a templatePath to an HTML document that instantiates widgets in the markup, I find myself constantly using event handlers to call methods within that widget. If I was doing this programatically I would just refer to the method as this.methodName(). But when the event is fired, "this" refers to the scope of the HTML element (tag) not the widget.

I've been doing this:

Syndicate content