Select to view content in your preferred language

Dynamically set the Title of a form

1548
3
Jump to solution
08-04-2016 01:41 PM
HelenZhou
Frequent Contributor

Is it possible to dynamically set the title to other text instead of the the name of the widget? For example, I have a customized widget called "MapClickSearch". It is used to display location information for one address, I would like the title to be the current address instead of the name of the widget.
Thanks

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Helen,

  Sure in the Widget.js use a line like this:

query(".title-label", this.getPanel().domNode)[0].innerHTML = "Blah Blah...";

Assumes you have the 'dojo/query' require added.

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

Helen,

  Sure in the Widget.js use a line like this:

query(".title-label", this.getPanel().domNode)[0].innerHTML = "Blah Blah...";

Assumes you have the 'dojo/query' require added.

HelenZhou
Frequent Contributor

Thank you, Robert. It works!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Helen,


  Don't forget to mark this question as answered by clicking on the "Correct Answer" link.

0 Kudos