Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Change a label in another window

$
0
0

Hi, How i can change a label of a window from another window??

index.xml

<Alloy>
    <Window class="container" backgroundColor="#555" backgroundImage="/Fondo App.jpg" onOpen="PosicionaBotones" onPostlayout="animateOpen" onFocus="ActualizaTexto">
 
        <Label id="LSerie" top="46%"> </Label>
 
        <ImageView id="BAjustes"  top="73%" onClick="AbreAjustes" image="/AJUSTES.jpg" />
 
    </Window>
</Alloy>
index.js
var ajustes = Alloy.createController('ajustes').getView();
 
function AbreAjustes() {
    ajustes.open();
}

Ajustes.xml

<Alloy>
    <Window class="container" backgroundColor="#555" backgroundImage="/Fondo App.jpg" onOpen="PosicionaBotones">
        <Label top="15%">Nº Serie</Label>
        <TextField id="TNSerie" top="20%" hintText="Introduzca el Nº de Serie" maxLength="12"/>
 
        <ImageView id="BGuardar"  top="76%" height="100px" width="100px" onClick="Guardar" image="/GUARDAR.jpg" />
    </Window>
</Alloy>

Ajustes.js

function Guardar(){
    $.ajustes.close();
}
First open "index" window. Then i push "BAjustes" and open "Ajustes" window. And when i push "BGuardar" button need update "LSerie" label of "index" with "TNSerie" value.

How i can update label LSerie??


Viewing all articles
Browse latest Browse all 8068

Trending Articles