tags:

views:

1080

answers:

2

How can i get the value of a Dojo TextBox?

Am doing this;

dijit.byId("textName").getValue();

But firbug tells me getValue() is deprecated! is use attr('value')!

but i have no clue on how to use attr('value') function

Help

Gath

A: 

I've done this and its working;

var titleEdit = dijit.byId('title');

var myValue = title.attr('displayedValue');

worked!

gath
A: 

In 1.2, Dijit moved to a common attribute accessor scheme. To use the new style and avoid the warning do this instead:

dijit.byId("textName").attr("value");

The lead for Dijit wrote up a good blog post on attr that might help.

Ben Lowery