Login Register

dynamic

Add button to div dynamically

I want to create a div dynamically and then create a dijit button and add it to the div.
I keep getting the error Node cannot be inserted at the specified point in the hierarchy" code: "3
Here is the code: What dumb thing am I overlooking?

//create the div
var fdiv= document.createElement("div");
fdiv.dojoType="dojo.dnd.Source";
fdiv.class="container";
fdiv.copyOnly="true";
fdiv.id="src1";
fdiv.jsId="c2";
document.body.appendChild(fdiv);

//create the button
var fparams = { label: "",
id: "but1",
showLabel: false
};

Dynamic Tooltip on a Dynamic Button

I am trying to create a row of small buttons with tooltips. I can create the buttons fine by creating an array of divs, but if I add the code for creating a dynamic tooltip, taken from test_tooltip.html I get a dojo error:

Here's the code:

divs[i]= document.createElement("div");
divs[i].style.pixelLeft= i*50;
divs[i].style.height= 40;
divs[i].style.width= 40;
divs[i].id="but"+i;
document.forms[0].appendChild(divs[i]);
var params = { label: "x",
showLabel: false

};
var bt = new dijit.form.Button(params, divs[i]);
var tip =dijit.Tooltip(

Problems when dynamically adding dijits to a form

I'm fairly new to Dojo, but wasn't able to find any information on this by searching (perhaps my search-fu is weak).

I'm attempting to have some local javascript add a second set of fields to a form. After running the function that adds them (and calls the parser), they work fine, but the previously generated versions get broken.

You can see the problem here:

http://geeklair.net/~dluke/dojo_problem.html

Here's an excerpt of the code:

dojo.require("dijit.form.Form");
dojo.require("dijit.form.TextBox");

Rendering the grid programaticaly and loading data into it through a json file created via a servlet

I want to render the grid such that the row and column headers are formed dynamically and also its contents are populated. The JSON object is available via a AJAX call. My aim is to create the grid with the help of this JSON object i get. What will be the right store to use ..eg. ItemFileReadStore,QuerryReadStore,..etc. I have to achieve this my calling the servlet only once in the AJAX call.

Here is my code

dojo11.addOnLoad(function(){

var jsonObject;

dynamic execution of the XHR response content

Hello,

I'm evalutaing Dojo by recreating an application previously built with other frameworks. Liking it so far and it's a lot lighter! But just encounter my first road block was hoping someone could help me solve...

Does Dojo provide a means for dynamically executing an XHR response content. In other words parse the xhr response for script tags and execute this javascript?

We've used the following solution (a plugin for YUI) in the past if this helps you understand our requirement.

http://www.bubbling-library.com/eng/api/docs/plugins/dispatcher

Many thanks in advanced!

Changing width of FilteringSelect object

Hi all,
i'm not really sure if i'm right in the development discussion of if my post is more a post for the support forum.
Please decide if you want to move this thread.

I create the FilteringSelect object with an empty store. Store items are filled lateron dynamically with ...store.newItem...
When creating the FilteringSelect i do not know anything about the items created lateron. Therefore i can set just an initial value for the with of the FilteringSelect when creating.

Project Idea: Dynamically generated forms from JSON representations

Hi,

I am Bharadwaj, final year student at the Indian Institute of Technology, Madras. I have been using dojo for the past 4 months on a project for the front end of a business system software, and I have found answers for almost all of my UI requirements within dojo; hats off to you guys. This post contains my idea for the GSoC 2008 for dojo.

How to combine dynamically created dijits with DnD?

Hi, I am new to dojo, I am trying to evaluate it for possible use in designing web based dynamically generated and some data driven UI.
I was wondering if somebody can answer few preliminary questions.
1. How to combine dijits with DnD?
Is it possible to combine one or more dijit with dojo DnD, i.e. make them dragable? I would like to have dijit tabs in dijit TabContainer dragble, so that their order can be changed dynamically (actually only the handles with the tab titles need to be dragable).

2. Dynamically created dijits?

Charting using Dojox

I have used the jpgraph package and prototype to create a page with auto-refreshing graphs that keep updated values from an SQL database. Dojox looks really convincing so I want to give it a try. Can someone please point me out in the right direction of creating a chart, linking it up to a database and then refreshing it?

How to create dynamically a widget ?

Hi,

I'm trying to create widgets (tabs) by getting html content from my server ... I get :

and I try to 'evaluate' it in order tu put the (dojo-ed) result under a node like this : function showAnim(animId) { var kw = {
Syndicate content