dojo

Is there a way to update the dojo tree item id with the id come from database?

Hi, I have a dojo tree that its nodes are created temporary in memory. I assigned every new node an id by timestamp like this: var newID = new Date().getTime(). This new node will associate with a form to control its info. My expected is: when the form is submit, the new id came from the database will replace the timestamp id above. Ho...

set icon for dijit.MenuItem

We have a case where we only know the icon for a menu item at runtime. I know there is a iconClass parameter for a diji.MenuItem, but this is of little help unless we dynamically add CSS rules at runtime with dojox.html.insertCssRule - there must be a better way! Here is an example of what we are trying to do: pMenu = new dijit.Menu({ ...

dojo datagrid custom sorting server side

Hello I am using dojo.data.ItemFileWriteStore to draw a dojo datagrid (which works fine) and the grid shows properly. I was using client side sorting and that was also working fine. but now I need to change the sorting and do that server side. For this I am trying to use onHeaderCellClick event, using which I am able to run a javascript ...

Fast, lightweight XML parser

I have a specific format XML document that I will get pushed. This document will always be the same type so it's very strict. I need to parse this so that I can convert it into JSON (well, a slightly bastardized version so someone else can use it with DOJO). My question is, shall I use a very fast lightweight (no need for SAX, etc.) X...

dojo.marginBox returns wrong height in IE6

Hi, I've been trying to get the height of a DIV using "dojo.marginBox", but I keep getting the wrong height in IE6. Here's part of my code: <div id="outerDiv"> <div id="hiderDiv" class="hider"></div> <div id="contentDiv1"></div> <div id="contentDiv2"></div> <div id="contentDiv3"></div> </div> The CSS for the "hiderDiv" looks...

How to add nodes to a dijit tree on the fly

Basically what I have is a tree with 3 nodes, created like so: for (var i=0; i<response.length; i++) { response[i]["type"] = "project"; } var data = { "identifier": "name", "label": "name", "items": response }; var store = new dojo.data.ItemFileRea...

Zend Form Submission not working

I am trying to submit a zend form. When I click the button to Submit the form the form doesn't do anything (it doesn't refresh the page either). I have the following create event page: <?php class Form_CreateEvent extends Form_DisplayEvent { public function init() { require_once('createEventInformation.php'); requi...

Javascript Dojo AJAX (XHR) Requests with Custom Headers in Firefox

I'm trying to make a request using dojo.xhrGet to grab some XML data from a server. I'm using dojo 1.4.0. The server requires that I pass credentials through a custom HTTP header called Myauthtoken. Everything works fine in Safari. The code pops up a dialog showing [object Document]. But in Firefox, the dialog shows null. Somewhere ...

Parsing ATOM feed in Dojo?

I am trying to parse an ATOM feed and display the relevant parts I need. After doing some searching, I couldn't find a way to do this in Dojo, so I wrote this implementation to get by in the meantime (var xml contains the atom feed): var names = this.getArray(xml.getElementsByTagName("name")); var contents = this.getArray(xml.getElement...

Is there a way to see a trace of the executed JavaScript in Firefox without using Firebug?

Update: Thanks for the responses so far. To clarify, I'm not really looking for a logger, but more of a debugger/tracer -- I want a dump of every piece of JavaScript that executed and when it executed. I tried Venkman earlier today but it isn't very stable. My theory is that something is going wrong deep in the Dojo code, or even the Fir...

Prepending form name, subform name to id of zend dojo form

I am using Zend Form and Dojo. I have a whole bunch of ids that are identical. If you look at the following code you can see my current look : <dt id="addElement-label">&nbsp;</dt><dd id="addElement-element"> <button name="createEventForm[categoryDetail][addElement]" id="createEventForm-categoryDetail-addElement" type="button">addElem...

dijit.form.select will close surrounding tooltip dialog in IE

Hi, I have encountered a strange behaviour using dijit.form.select inside a tooltip-dialog. Here's a shortened part of my code: <div id="toolbar" dojoType="dijit.Toolbar"> <div dojoType="dijit.form.DropDownButton"> <div dojoType="dijit.TooltipDialog" id="tooltip"> <input dojoType=dijit.form.TextBox type="text" id="textbox">...

Expanding all nodes in dijit.Tree

Is there a good way to expand/close all the expandable nodes in a dijit.Tree? For those looking for an answer, put this in your initializing code: var treeControl = new dijit.Tree({ model: treeModel, expandAll: function() { // summary: // Expand all nodes in the tree // returns: // Deferr...

Dojo fails to load from google's CDN using Chrome; produces Uncaught illegal access

When I load dojo 1.4 from google's CDN, I get the following error: native string.js:183 Uncaught illegal access This only happens on about half the refreshes when using Chrome, other times it works fine. I've verified that the problem reproduces on multiple windows machines running Chrome. I'm using the following code to create my doj...

dijit tree insert and delete nodes

Has anyone got a working example on howto insert and delete nodes in a tree that is directly connected to a datastore (FileItemWriteSotre) without explicit declaring a Model? I tried everything I found searching net and forums, nothing works. Inserting the node into the datastore seems to work but does not insert a node in the Tree. A...

PHP/JS: How to implement dynamic breadcrumbs? (multi-window/tab compatible)

Hi, I'm working on a site where we need "dynamic" breadcrumb generation. Pages within this application are not specific children of the other, so when the user is browsing one of them, I can't simply retrace steps back up. I could have the following breadcrumbs-like lists: (updated) * inbox > message > user profile * search results ...

dojo.data.ItemFileReadStore: Invalid item argument with Dijit combobox

Hello, I have a jsp page with a dijit.form.ComboBox which is populated by a dojo.data.ItemFileReadStore connecting to a back end java server. It works almost as expected, the combobox shows the results correectly. Problem is that I receive a 'dojo.data.ItemFileReadStore: Invalid item argument.' when scrolling in a results list with th...

Null or 0 values in dijit.form.datetextbox

I'm using a standard output of Zend_Dojo_Element_DateTextbox AKA dijit.form.datetextbox... I want to use NULL or 0 values, but it always defaults to 11/30/1899... is there a simple option to enable this?? ...

dojox.gfx and shape filters

Hello, I've been successfully using dojox.gfx with SVG renderer to render my graphics in a browser-independent way. I know that on of the main reasons why SVG-style filters have not been implemented in dojox.gfx is because they are not part of the Canvas and VML specification. What I am trying to achieve is apply some effects to my d...

How to test non-dojo javascript code with doh?

doh is the dojo unit-testing framework. I am trying to use doh to test a non-dojo javascript code, but i am facing the problem that doh seems intrusive and oblige me to use dojo.provide() in the tested js file(and the corresponding dojo.require() in the test js file). I want the tested js file to be unmodified and dojo-agnostic. Is it po...