How can I get the Dojo TextBox value?
Doing it;
dijit.byId("textName").getValue();
But firbug tells me that getValue () is deprecated! the value of attr ('value') is used!
but I don't know how to use the attr ('value') function
reference
Gough
Starting with Dojo 1.5, you must use the get and set methods to retrieve and set properties. But the attr method works until there is Dojo 2.0.
get
set
attr
var box = dijit.byId('textbox') box.get('value'); box.set('value', 'new value');
I did this and his work;
var titleEdit = dijit.byId('title'); var myValue = title.attr('displayedValue');
working!
In 1.2, Dijit switched to a general attribute access scheme. To use the new style and avoid the warning, do this instead:
dijit.byId("textName").attr("value");
The Dijit manual wrote a good blog post on attr that might help.