PDA

View Full Version : [CLOSED] Label: Update icon in javascript



cwolcott
Nov 16, 2012, 4:17 PM
I must have a Friday brain freeze. How can I change the icon of ext:Label in javascript?

Daniil
Nov 16, 2012, 4:30 PM
Hi Chris,

Example

App.Label1.setIconCls("#Add")

cwolcott
Nov 16, 2012, 5:52 PM
That is what I thought, but I am getting <HTMLLabelElement> has no method setIconCls. Below is how the label is created.


<ext:Label runat="server" ID="UpdatedTime" ClientIDMode="Static" Padding="1" Icon="Time" StyleSpec="font-size: 9px; background-color: #FFFFB7;" Height="18px">
<Listener>
<AfterRender Handler="this.setText(lastUpdated());" />
</Listener>
</ext:Label>

Daniil
Nov 16, 2012, 6:00 PM
I guess you access the Label view "UpdatedTime", but have to via "App.UpdatedTime".