Skip to content

Instantly share code, notes, and snippets.

@robertbasic
Created March 15, 2011 20:34
Show Gist options
  • Select an option

  • Save robertbasic/871416 to your computer and use it in GitHub Desktop.

Select an option

Save robertbasic/871416 to your computer and use it in GitHub Desktop.
showing the custom tooltips
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