dojo

Dojo: dojo onblur events

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a form setup with dojo 1.5. I am using a dijit.form.ComboBox and a dijit.form.TextBox The Combobox has values like "car","bike","motorcycle" and the textbox is meant to be an adjective to the Combobox. So it doesn't matter what is in the Combobox but if the ComboBox does have a value then something MUST be filled in the TextBox. Optionally, if nothing is in the ComboBox, then nothing can be in the TextBox and that is just fine. In fact if something isn't in the Combobox then nothing MUST be in the text box. In regular coding I would

how to catch ALL javascript errors with window.onerror? (including dojo)

…衆ロ難τιáo~ 提交于 2019-12-03 08:17:32
问题 this question is a follow-up to javascript: how to display script errors in a popup alert? where it was explained how to catch regular javascript errors using: <script type="text/javascript"> window.onerror = function(msg, url, linenumber) { alert('Error message: '+msg+'\nURL: '+url+'\nLine Number: '+linenumber); return true; } </script> I tried it and found out that dojo erros like this one: TypeError: this.canvas is undefined dojo.js (Row 446) were not reported using this method, which

Why can't I roll a loop in Javascript?

…衆ロ難τιáo~ 提交于 2019-12-03 07:41:25
I am working on a web page that uses dojo and has a number (6 in my test case, but variable in general) of project widgets on it. I'm invoking dojo.addOnLoad(init), and in my init() function I have these lines: dojo.connect(dijit.byId("project" + 0).InputNode, "onChange", function() {makeMatch(0);}); dojo.connect(dijit.byId("project" + 1).InputNode, "onChange", function() {makeMatch(1);}); dojo.connect(dijit.byId("project" + 2).InputNode, "onChange", function() {makeMatch(2);}); dojo.connect(dijit.byId("project" + 3).InputNode, "onChange", function() {makeMatch(3);}); dojo.connect(dijit.byId(

Where can I find a list of icon images for the dojo toolkit dijit widgets?

隐身守侯 提交于 2019-12-03 06:31:45
Simple question I guess, but despite some googling I'm no closer to finding an answer. Does anyone know where to find a list of the icons available in the Dojo toolkit? The best place to look at would be Dojo Toolkit nightly icon directory . Here you can view the CSS classes that correspond to all available icon styles, and if you go to the images directory you can actually see the icon sprites. Unfortunately this isn't as simple as a Class Name -> Icon Image mapping, but all the CSS class names are listed in the same order as the sprite images, left to right. To quickly scan, know that the

How to run Dojo DOH unit-tests through Jenkins?

北城以北 提交于 2019-12-03 06:09:27
Has anyone tried integrating Dojo DOH unit-tests with Jenkins? I'd like to do the following, but don't want to reinvent it if this has already been done. So, I'm thinking: Kick off the DOH-tests from a post-build step in Jenkins and wait for the results Run the tests themselves in a headless-browser (e.g. Crowbar) Parse the succes/error-count from the HTML returned by Crowbar Find (or write) a Jenkins plugin that will (a) fail the build if there are failing tests, (b) render the test results, (c) possibly integrate results into the CI game plugin Questions: Has this been done before? Do you

What is the main difference between require() and define() function in dojo and when would we use either?

耗尽温柔 提交于 2019-12-03 04:58:02
问题 I am new to learning dojo and I have come across the require() and define() functions and I can not get my head around either of them. Also, when would I use either of them? A small demo or example would be beneficial. Many Thanks! 回答1: require and define are part of the asynchronous module definition (AMD) API. You use define to define a module that can be consumed by other code. Generally, define will be used in a javascript file. The javascript file is defining a module. All Dojo files use

how to reset scroll position in a div using javascript

為{幸葍}努か 提交于 2019-12-03 03:46:36
I am working on a mobile hybrid application. In my html page, I have 3 tabs. When clicking a tab, the content of the scrollable div gets changed. My problem is when I scroll down the content of div (view) and click another tab, the content disappears (but the content is there). Please help me so I can reset the div scroll position when clicking any tab. Please give me suggestions only with JavaScript or CSS, not with JQuery as I am not using the JQuery library. Without seeing code, i can just guess. If you want to reset the scroll position you can simply use window.scrollTo(0,0); add this code

How do I retrieve values from dojo.data.ItemFileReadStore

匿名 (未验证) 提交于 2019-12-03 02:59:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: First, I read this short help thread here: CLICK It uses a JSON file built together with PHP which looks something like THIS: { name:'Italy', type:'country' }, { name:'North America', type:'continent', children:[{_reference:'Mexico'}, {_reference:'Canada'}, {_reference:'United States of America'}] }, { name:'Mexico', type:'country', population:'108 million', area:'1,972,550 sq km', children:[{_reference:'Mexico City'}, {_reference:'Guadalajara'}] }, { name:'Mexico City', type:'city', population:'19 million', timezone:'-6 UTC'}, { name:

Loading Dojo dijit CSS from CDN

匿名 (未验证) 提交于 2019-12-03 02:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am quite new to dojo world. Using dojo with google's CDN is well and Fine. But while using dijit just dojo.require() does not work. Where can I find the default CSS Themes from CDN ?? and another question out of quorisity: Would the the CSS configuration for dijit work for dojox too ?? 回答1: The CSS can be found on Google's CDN. I've used it in a page or two. Here's some CSS link tags. <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/resources/dojo.css"> <link rel="stylesheet" type="text/css"

Data is not getting displayed in dojox.data.Datagrid on click event.

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to display data in a data grid. The data is retrieved by a URL using $.get Method as a JSon type. I am not getting any error. But not getting Data grid as well. Here's me script code :: <script type="text/javascript"> $("document").ready(function(){ $('#contentpaneid').bind('click', getInfoFromServer); function getInfoFromServer(){ $.get("http://localhost:8080/2_8_2012/jsp/GetJson.jsp?random=" + new Date().getTime(), function (result) { success:postToPage(result), alert('Load was performed.'); },"Json"); function postToPage(data){