dojo

encoding discrepancy between "main" page and dojo dialog

I have a strange encoding situation, whereby the html page itself displays as it should (with all the accénted chäracters properly displayed), but all the popup dojo dialogs fail to use the correct encoding. Here is the setup: Java web project with Hibernate/Spring/Struts2 running on Tomcat6.0.18; the pages are generated as JSP tiles,...

Dojo - XHTML validation ?

Is it possible to make Dojo (javascript) widgets validate for XHTML? If so, how? Can it be something as simple as using CDATA? ...

In Dojo or Javascript how do I make my event handler fire before other event handlers?

In the Dojo Javascript library, I understand how to use dojo.connect or dojo.publish to wire up my event handler to an event. That functionality works great. But I want to do one additional thing. I want my event handler to fire first, before any other already defined event handlers. I suppose this could be called "event handler inse...

Does anyone have a simple example of a working DojoX Grid control?

I'm trying to add a DojoX Grid control to my website, but I can't get it to work. I'd like a simple example to start from, but there doesn't seem to be one anywhere. These are my requirements: I need an example of the 1.2 Grid It should load the Dojo libraries from googleapis.com (or AOL's servers; not the trunk code or the Dojo code...

Facing problem in setting Expire Time for custom build Dojo script

Hi I am new to Dojo and tried to compress the Dojo Script by creating a custom build. As we know that it will be good to set expiry so that file should not get downloaded at every time but that is my problem as since compression and custom build there is no EXPIRE TIME for Dojo.js. How can we set Expire for the compiled custom build. ...

Replacing innerHTML content with Dojo / Spring Webflow 2

I've recently started heavy use of Spring Webflow 2 in my project so that I could make use of its integration with the Dojo javascript framework. I have a list of rows in a <table>, each row containing information about transactions in our system. I'd like to be able to get more information on a transaction by having a link in each row...

Programmatically controlling a Dojo Accordion

I have a dijit.layout.AccordionContainer on my page which is defined in the html and created when dojo parses the page on load. Then, as the user interacts with the page I use Ajax to retrieve data and programmatically populate the container (removing existing items first). To illustrate my issue simply, here is some code that doesn't ...

dojo.xhrPost Not Sending any Data

I'm just getting into Dojo and wanted to try a simple AJAX Post like the examples on Dojo's website. Here is the HTML/JS: <form method="POST" id="addProjectForm"> <dl> <dt>Project Name:</dt> <dd><input dojoType="dijit.form.TextBox" id="projectName"></dd> <dt>Project Description:</dt> <dd><textarea dojoType="dijit.form.Textarea" ...

Append dynamically generated dijit to end of a div

Is there a way to create and append a dijit to the end of a div? Say I have the following code: <div id="attendants"> </div> <button dojoType="dijit.form.Button" onClick="addPerson();">Add Person</button> I found the following code online but this replaces my 'attendants' div: var personCount = 0; function addPerson() { personCo...

Doh / dijit robot - no mouse actions happening

I wrote an automated test using dijit robot - but in order to be able to use relative paths within our web application, I created an OSGi service for our tests and put the test code in a velocity template. When I try to run the tests, nothing happens. If I use the same script in an html file and access it directly from windows explorer...

VerticalSlider inside a Dialog: issue with IE

In general, I have no trouble using a dijit.form.VerticalSlider (with right decorations). Everything usually works fine in Firefox, Safari, IE6 or IE7. Things go pear-shaped in IE6 or IE7 when I try to put that VerticalSlider inside a dijit.Dialog. In that scenario, it still works great in FF and Safari, but in IE 6 and 7, there are a...

Dojo resize and delete element on animation complete

With a div like this: <div id="im1" class="information_message error">Error message here <a href="javascript:hide('im1')">Hide</a></div> And the following dojo/javascript code: function hide(id){ id.innerHTML = ''; dojo.animateProperty({ node: id, duration: 500, properties: { height: {end: 0} }, ...

Running Dijit robot tests in DOH runner

I am using dijit robotx and using doh.robot.initRobot(myAppUrl) within my test page to run tests against my actual app. I load this page up in DOH runner. It is working except after a really short amount of time, it gives me a timeout error. I ensured my timeouts for the tests were long, but it still happens. Is there some special timeou...

triggering invalid message with zend_dojo elements on post fail.

Hi, I am having a few issues with a Zend_Form that I have which uses Dojo elements to handle user validation. The scenario is when are user fills in the form the dojo elements ensure the formatting is correct. On post of the form if there is an error such as the email address already existing in the database, my code throw an excepti...

Why is the legend in my Dojo charting chart not showing the colours?

I'm using dojo charting and for some reason the legend for my chart is showing x's instead of the colours. Here is my code: dojo.require("dojox.charting.Chart2D"); dojo.require("dojox.charting.themes.PlotKit.blue"); dojo.require("dojox.charting.widget.Legend"); dojo.require("dojox.layout.FloatingPane"); dojo.require("dojox.charting.the...

Remove all the children DOM elements in div

I have the following dojo codes to create a surface graphics element under a div: .... <script type=text/javascript> .... function drawRec(){ var node = dojo.byId("surface"); // remove all the children graphics var surface = dojox.gfx.createSurface(node, 600, 600); surface.createLine({ x1 : 0, y1 : 0, x2 : 600, y2 : 600 })....

change one value in style attribute by JS?

I have a div defined with a style like this: <div id="div1" style="width:600;height:600;border:solid 1px"></div> How can I change the height of the div by Javascript with a function? <script type="text/javascript"> function changeHeight(height) { var node = dojo.byID("div1"); // change height? } <a href="javascript:changeHeight...

Where is dojo.charting libary on AOL site?

I am testing dojo charting library. I prefer to use the library from AOL web page instead of installing dojo into my computer. I have the following codes: <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.2/dojo/dojo.xd.js"&gt; </script> <script type="text/javascript"> dojo.require("dojox.gfx"); dojo.require("do...

How to add a div dynamically by using Dojo?

I have a the following static div: <body> <div id="div1"></div> .... I want to add a div with id "div1_1" within div1 dynamically by using dojo. How can I do it? ...

How to return two vars as properties from a Javascript function

Not sure if this is possible in Dojo or JS for a function to return a object with two properties of vars? My codes do not work but just as my requirement: function getObj() { var var1 = 123; // 123 as simple case, but it could be a DOM node var var2 = 345; // another DOM node return {v1: var1, v2: var2}; // any way to get tw...