Widget id's

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Widget id's

Thomas Rudin
Hi @all,

I know, this must be a very beginner style question - no surprise cause I'm a very beginner with dojo :)

I'd like to access the widgets id from within the widget code. Let's say, I have something like

<input id="someid" dojoType="someWidget" />

and I'd like to get "someid" from within my HtmlSomeWidget.js file. How would I have to do this. this.id would have been to simple.. ;)

Thanks in advance
Thomas.


--
Thomas Rudin
Diplomand

WEB.DE GmbH
Amalienbadstraße 41 · D-76227 Karlsruhe
Tel. +49-721-94329-8329 · Fax +49-721-94329-4044
[hidden email] · http://www.web.de/
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Widget id's

Alex Russell
On Wednesday 07 December 2005 11:21 am, Thomas Rudin wrote:

> Hi @all,
>
> I know, this must be a very beginner style question - no surprise
> cause I'm a very beginner with dojo :)
>
> I'd like to access the widgets id from within the widget code. Let's
> say, I have something like
>
> <input id="someid" dojoType="someWidget" />
>
> and I'd like to get "someid" from within my HtmlSomeWidget.js file.
> How would I have to do this. this.id would have been to simple.. ;)

this.widgetId

You can request a widget object by ID using
dojo.widget.byId("someWidget")

Regards

--
Alex Russell
[hidden email] BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
[hidden email]  F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest