|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
FilteringTable double clickIn setting up the double click events for a Filtering Table programmatically, how come this works: dojo.event.connect(row[i], "ondblclick", BuildCodes, "rowSelected"); but this doesn't: row[i].ondblclick = BuildCodes.rowSelected; where row[i] is the row of the FilteringTable that I'm working with. Are they not programmatically equivalent? Matthew Engel Senior Programmer/Analyst State University of New York at Stony Brook mengel@... _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|||||||||||
|
|
Re: FilteringTable double clickHi Matthew,
I tried doing the same it doesnt seem to work at all. Is there anything i am doing wrong? Thanks Sandeep |
|||||||||||
|
|
Demo Application error on www.dojotoolkit.org in IE7I run the demo mail application on www.dojotoolkit.org (not from the filesystem of my PC), the browser emit a jscript error message, indicate that in line 2447 a "lack of object" error occurs.
This does not happen in ff or ie6. It seems there exist some incompatible issues between ie7 and dojo... _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|||||||||||
|
|
Re: FilteringTable double clickDo you have a code snippet I can see? Here's what works... var row = document.getElementById('aBLTblePlaceHolder').getElementsByTagName('tr'); // Row of table used as Filteringtable for (var i=0; i<row.length; i++) { // row[i].ondblclick = BuildCodes.rowSelected; // Does not work, don't knwo why. dojo.event.connect(row[i], "ondblclick", BuildCodes, "rowSelected"); // Connect event to each row in table. } Matthew Engel Senior Programmer/Analyst State University of New York at Stony Brook mengel@...
Hi Matthew, I tried doing the same it doesnt seem to work at all. Is there anything i am doing wrong? Thanks Sandeep -- View this message in context: http://www.nabble.com/FilteringTable-double-click-tf2829024.html#a7985766 Sent from the Dojo mailing list archive at Nabble.com. _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|||||||||||
|
|
Re: FilteringTable double clickThanks for the sample. Here's what i was trying earlier which did not work
var varTable = dojo.widget.byId("dataTable"); for (var i = 0; i < data.length; i++) { var bundle = data[i]; var rowEntry = { Id: i, name: bundle['name'], runValue: bundle['runValue'], nodePath: bundle['nodePath'], state: bundle['state'] } rows.push(rowEntry); dojo.event.connect(rowEntry, "ondblclick", table, 'onVariableSelect'); } varTable.store.setData(rows); } I am yet to try with your sample. Thanks Sandeep |
|||||||||||
|
|
Re: FilteringTable double clickStrange that following code which does not have BuildCodes as one arguments to dojo.event.connect call works for me.
var row = document.getElementById('aBLTblePlaceHolder').getElementsByTagName('tr'); for (var i=0; i<row.length; i++) { dojo.event.connect(row[i], "ondblclick", "rowSelected"); } Thanks for help. Sandeep |
|||||||||||
|
|
Re: FilteringTable double clickBuildCodes is the scope/class of rowSelected. Someone correct me if I'm wrong, but I think it defaults to dojo if none is specified. Matthew Engel Senior Programmer/Analyst State University of New York at Stony Brook mengel@...
Strange that following code which does not have BuildCodes as one arguments to dojo.event.connect call works for me. var row = document.getElementById('aBLTblePlaceHolder').getElementsByTagName('tr'); for (var i=0; i<row.length; i++) { dojo.event.connect(row[i], "ondblclick", "rowSelected"); } Thanks for help. Sandeep -- View this message in context: http://www.nabble.com/FilteringTable-double-click-tf2829024.html#a7990692 Sent from the Dojo mailing list archive at Nabble.com. _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|||||||||||
|
|
Re: FilteringTable double clickCan't answer you on the event question (though you shouldn't ever assign an event directly like that), but I can say that you should probably attach that event handler either to the tbody element or to the table element, and not to every row. That way it's only created once, and you don't have to try to reassign it to each new row that is created.
trt
|
|||||||||||
|
|
Re: FilteringTable double clickGreat. I tried connecting it to the tbody element, but it didn't work, but connecting it to the table itself worked fine. Thanks for saving my users some CPU. Working code: var body = document.getElementById('aBLTblePlaceHolder'); dojo.event.connect(body, "ondblclick", BuildCodes, "rowSelected"); Did Not work: var body = document.getElementById('aBLTblePlaceHolder').getElementsByTagName('tbody'); dojo.event.connect(body, "ondblclick", BuildCodes, "rowSelected"); Thanks, Matthew Engel Senior Programmer/Analyst State University of New York at Stony Brook mengel@...
Can't answer you on the event question (though you shouldn't ever assign an event directly like that), but I can say that you should probably attach that event handler either to the tbody element or to the table element, and not to every row. That way it's only created once, and you don't have to try to reassign it to each new row that is created. trt mengel wrote: > > In setting up the double click events for a Filtering Table > programmatically, how come this works: > > dojo.event.connect(row[i], "ondblclick", BuildCodes, > "rowSelected"); > > but this doesn't: > > row[i].ondblclick = BuildCodes.rowSelected; > > where row[i] is the row of the FilteringTable that I'm working with. > > Are they not programmatically equivalent? > > > Matthew Engel > Senior Programmer/Analyst > State University of New York at Stony Brook > mengel@... > _______________________________________________ > Dojo FAQ: http://dojo.jot.com/FAQ > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook > Dojo-interest@... > http://dojotoolkit.org/mailman/listinfo/dojo-interest > > -- View this message in context: http://www.nabble.com/FilteringTable-double-click-tf2829024.html#a7991888 Sent from the Dojo mailing list archive at Nabble.com. _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|||||||||||
|
|
dojo preloader, and delayed widget DOM parsingHi everyone!
How could be possible to make a dojo preloader, which is preload every js, img, html, .. file to the client, and during that a message on the screen, to wait.? I mean pre-load the dojo.js itself. and how could i make the dojo to do not parse the DOM right after loaded the dojo.js, just on my call. I mean, dojo.js is loaded, but not parsed the HTML file, only when i say do it :) and merry christmas! :) regards, Szabi _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|||||||||||
|
|
Re: FilteringTable double clickSecond one didn't work because you tried to attach it to a node list and not a node.
var body = document.getElementById('aBLTblePlaceHolder').getElementsByTagName('tbody')[0]; dojo.event.connect(body, "ondblclick", BuildCodes, "rowSelected"); trt
|
|||||||||||
|
|
Re: dojo preloader, and delayed widget DOM parsingHi Marton,
Start by looking into parseWidgets = false It overrides the default auto-parse behavior, and then relies on you to call createWidget on each DOM node you'd like parsed. This can result in a significant performance increase for very large documents (that have lots of nodes w/o dojo widgets). To acheive a preloader effect, you can investiate using what I call a "curtain div" (which is sort of what the dialog does) that obscures the visible part of a document. Set the css height and width to 100% and make sure it's z-index is the highest on the page. When you're done parsing widgets, fade out the curtain :) On 12/20/06, Márton Szabolcs <msca123@...> wrote: > Hi everyone! > > How could be possible to make a dojo preloader, which is preload every > js, img, html, .. file to the client, and during that a message on the > screen, to wait.? I mean pre-load the dojo.js itself. > > and how could i make the dojo to do not parse the DOM right after loaded > the dojo.js, just on my call. I mean, dojo.js is loaded, but not parsed > the HTML file, only when i say do it :) > > and merry christmas! :) > > regards, > Szabi > _______________________________________________ > Dojo FAQ: http://dojo.jot.com/FAQ > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook > Dojo-interest@... > http://dojotoolkit.org/mailman/listinfo/dojo-interest > Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|||||||||||
|
|
Re: dojo preloader, and delayed widget DOM parsingHi,
if you are looking only to display loading indicator while dojo.js is loading you should place dojo.js loading tag after some DOM elements representing the indicator, e.g.: <...> <body> <span>Please wait, Dojo is loading</span> <script type="text/javascript" src="dojo.js"></script> </body> This will display loading message almost immediately. Another thing is automatic loading indicator, during any dojo.require(), which is impossible to achieve when loading packages in synchronous way (anyway sync also freezes the browser for a while, so i do not use it). It is because the browser is the one who decides when changes in DOM will be displayed and FF & IE display changes only when javascript is idle (unfortunately this happens only after the package is loaded). There is nothing like FLUSH is javascript:( When using asynchronous - i.e. cross domain - package loader, you can display indicator when dojo.hostenv.loadPath() is called and hide it on dojo.hostenv.packageLoaded(), I tried it in aspect way with dojo.event.kwConnect , but it does not work, so I changed loader_xd.js. Phusick. On 12/20/06, Márton Szabolcs <msca123@...> wrote: Hi everyone! _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook Dojo-interest@... http://dojotoolkit.org/mailman/listinfo/dojo-interest |
| Free embeddable forum powered by Nabble | Forum Help |