Login Register

connect

Performing an action when a data store finishes loading

I'm trying to catch an event when my datastore finishes loading the data originally, but I can't seem to get it.
I need to modify some data (client side) before a grid uses the data.
I've tried connecting to the onLoad, onNew and constructor events with no success.

Here's my last attempt:

pdojo.addOnLoad(function(){
pdojo.connect( questionStore, "onNew", "test123");
});

function test123( )
{

GFX Mover vs Moveable

Can anyone elaborate on the difference between dojox.gfx.Mover and dojox.gfx.Moveable?

(Solved) connect to grid onSet event programmatically

I'm trying to connect to a grid for the onSet event like this:

var gridEventHandler = {
onset: function(item,attr,oldVal,newVal) {}
}
dojo.connect(grid,'onSet',gridEventHandler,'onset');

The event handler does not fire. What am I doing wrong?

Dojo.connect

Please help. I am unable to connect these simple function using dojo.connect. The commented code [dojo.connect(anchor,"onclick",dummyAgain)] works but not the connection b/w [dojo.connect(dummy1,dummyAgain)]

 

function dummyAgain(){
console.debug("dummyAgain");
}
function dummy1()
{
console.debug("dummy1");
}
function dummy(){
console.debug("dummy");
dummy1();
}

dojo.connect with dijit.Editor

I've got an application where editor(s) are created programmatically, and then (for some of them) an onBlur event is attached to the Editor. The javascript looks something like:

function loadIditable(json) {
//get json object from perl
var myJSONObject = eval('(' + json + ')');

for (var cnt=0;cnt

problem with dojo.connect

I don't understand why this example doesn't work.

<script type="text/javascript">
        function sayHello()
        {
                alert("hello");
        }
       
                dojo.addOnLoad(function(){
                        var button1 = new dijit.form.Button({
                                id: "button1",
                                label:"Hello Dojo",
                                iconClass:"dijitEditorIcon dijitEditorIconSave"
                        },
                        dojo.byId("main"));
                        var d = dojo.connect(button1,'onclick',sayHello);
                });

The Button is shown correctly. But if you click on it, nothing happens.
Whats wrong?
Thanks in advance.

Chaining DOM event with connect

I'm sorry if its been already answered, couldn't find a relevant topic.

In the example below, bar function never gets called. so how do I chain dom events to other methods other than the original target i.e. on keypress, it should call echo and then bar. it calls echo on keypress but bar never gets called. Is it possible to do this? if so how or any workarounds??? Thanks.

Dojo Events are Great

Get change event from dojox.grid.editors.bool

Hi

I have a grid with a view as follows:

var DayColumns =
{ cells: [[
{ name: "Lead", width: "40px", editor: dojox.grid.editors.bool },
{ name: "First Name", width: "100px" },
{ name: "Last Name", width: "100px" }
]] };
var DayGridLayout = [ DayColumns ];

I need to know when the user has changed the value of the checkbox in the first column of each row. How do I connect an event to this "dojox.grid.editors.bool" checkbox for each row?

Thanks
G

Question about onDownloadEnd event

Hi,
I have successfully used dojo.connect() to call a custom Javascript method (in global scope) when the onDownloadEnd event fires on a TitlePane I have.

function sourceXMLHandler() {
alert('here');
}

dojo.addOnLoad(function() {
var mySC = new dijit.layout.LayoutContainer( {title:"Source Container"}, dojo.byId("sourceContainer"));
var res_1 = new dijit.TitlePane({id: 'res_1', widgetId: 'res_1', style: 'padding-bottom: 15px;', title:'My Source', href:'/ts2/query/?sourceID=1&searchID=48'});
dojo.connect(res_1, 'onDownloadEnd', 'sourceXMLHandler');

Page Load / Unload

To perform any DOM scripting, one needs a DOM to work with. Otherwise, you don't have nodes to attach your events to or manipulate, and the results of your program can be undesirable (e.g., no output for no obvious reason, or events attached to the document root).

Syndicate content