Created
March 15, 2011 20:34
-
-
Save robertbasic/871416 to your computer and use it in GitHub Desktop.
showing the custom tooltips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var errors = dojo.query("form ul.errors").forEach(function(node, idx, nodes){ | |
| var id = node.parentNode.firstChild.getAttribute('for'); | |
| var label = "<ul class='errors'>" + node.innerHTML + "</ul>"; | |
| var tooltip = app.errorTooltip({ | |
| label: label, | |
| connectId: [id] | |
| }); | |
| document.body.appendChild(tooltip.domNode); | |
| tooltip.show(); | |
| // these next 2 lines are for marking the connected fields as invalid | |
| // as they are also an instance of dijit.form.ValidationTextBox | |
| dijit.byId(id).state = "Error"; | |
| dijit.byId(id)._setStateClass(); | |
| }).style({"display":"none"}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment