
radio button en Flex
Publicado por Alejandro (1 intervención) el 26/09/2014 01:06:11
Agradeceré me puedan decir como pasar valor de flex 3 a php de radio button este es el codigo
este el flex.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="users.send()"
color="#000101" backgroundGradientAlphas="[0.48, 1.0]"
backgroundGradientColors="[#C1C3C9, #103CF9]" cornerRadius="8"
alpha="1.0" borderStyle="solid" borderColor="#ED7F08"
themeColor="#FFFC00">
<mx:HTTPService id="users" url="http://localhost/proyecto1/conexion.php"
resultFormat="e4x"/>
<mx:HTTPService id="userLogin" url="flex.php"
useProxy="false"
method="POST" result="getLoginResult(event)" fault="opciones(event.currentTarget.selectedValue)">
<mx:request xmlns="">
<dusuario> {dusuario.text} </dusuario>
<dclave> {dclave.text} </dclave>
<usu> {usu.text} </usu>
<dnivel> {dnivel.text} </dnivel>
</mx:request>
</mx:HTTPService>
<mx:Script>
<![CDATA[
public function rtn_mayus():void
{usu.text = usu.text.toUpperCase();}
]]>
</mx:Script>
<mx:Script>
<![CDATA[
import mx.controls.ProgressBar;
import mx.charts.chartClasses.DualStyleObject;
import mx.collections.XMLListCollection;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.managers.PopUpManager;
import mx.containers.TitleWindow;
import mx.containers.ApplicationControlBar;
import mx.controls.ToolTip;
import mx.controls.Alert;
import mx.events.ItemClickEvent;
[Bindable]
private var loginResult : String;
public var opcion:String;
public function getLoginResult(event : ResultEvent) : void{
loginResult = event.result.login;
Alert.show(loginResult, "Estatus");
}
public function opciones(event:ItemClickEvent):void {
if(event.currentTarget.selectedValue == "al")
{ opcion = event.currentTarget.selectedValue;
//Alert.show("Seleccionaste el alta "+ opcion);
}
else
{ if(event.currentTarget.selectedValue == "ba")
{
//Alert.show("Seleccionaste la baja")
}
else {
Alert.show("Seleccionaste modificar")
}
}
}
]]>
</mx:Script>
<mx:WipeUp id="wipeOut" duration="1000"/>
<mx:WipeUp id="wipeIn" duration="1000"/>
<mx:TabNavigator x="23" y="10" width="358" height="320" id="uno">
<mx:Canvas width="100%" height="100%" label="Consulta" cornerRadius="20" borderColor="#0D11B3" borderStyle="solid" backgroundColor="#C2B8B8" themeColor="#6A70E6" fontFamily="Arial" fontSize="12" borderThickness="4">
<mx:DataGrid dataProvider="{users.lastResult..persona}" width="308" fontFamily="Times New Roman" fontSize="11" borderStyle="solid" borderColor="#010004" alternatingItemColors="[#B7B9BE, #FFFFFF]" themeColor="#F5ED72" x="10" y="80">
<mx:columns>
<mx:DataGridColumn headerText="USUARIO" dataField="usuario" width="65" textAlign="center"/>
<mx:DataGridColumn headerText="NOMBRE" dataField="nombre"/>
</mx:columns>
</mx:DataGrid>
<mx:Label text="Huesario's and Yonke's" fontFamily="Arial" fontSize="14" textAlign="center" enabled="true" x="10" y="18"/>
<mx:Label text="Mantenimiento de usuarios" fontFamily="Arial" alpha="1.0" x="55" y="53"/>
<mx:Image source="images/loldcar.gif" width="131" height="85" scaleContent="true" autoLoad="true" x="215" y="18"/>
</mx:Canvas>
<mx:Canvas label="Mantenimiento" width="100%" height="100%" fontFamily="Arial" fontSize="12" borderStyle="solid" borderColor="#000100" backgroundColor="#EB961C" borderThickness="4" themeColor="#5517A2" cornerRadius="20" alpha="1.0" backgroundAlpha="1.0">
<mx:Label text="Huesario's and Yonke's" fontFamily="Arial" fontSize="14" textAlign="center" enabled="true" x="10" y="18"/>
<mx:Image source="images/loldcar.gif" width="131" height="85" scaleContent="true" autoLoad="true" x="215" y="18"/>
<mx:Label x="8" y="65" text="Usuario :"/>
<mx:Label x="21" y="94" text="Clave :"/>
<mx:Label x="7" y="123" text="Nombre :"/>
<mx:Label x="25" y="152" text="Nivel :"/>
<mx:TextInput x="81" y="65" id="dusuario" width="74" height="21" maxChars="8" backgroundAlpha="1.0" backgroundColor="#F9F600" borderStyle="solid" textAlign="center" borderThickness="2" cornerRadius="5" alpha="1.0" editable="true" enabled="true" borderColor="#4CA9F0" themeColor="#030105"/>
<mx:TextInput x="81" y="94" id="dclave" width="74" height="21" maxChars="8" backgroundAlpha="1.0" backgroundColor="#F9F600" borderStyle="solid" textAlign="center" borderThickness="2" cornerRadius="5" alpha="1.0" editable="true" enabled="true" borderColor="#4CA9F0" themeColor="#030105" displayAsPassword="true"/>
<mx:TextInput change="rtn_mayus()" id="usu" x="81" y="123" width="233" height="21" maxChars="55" backgroundAlpha="1.0" backgroundColor="#F9F600" borderStyle="solid" textAlign="left" borderThickness="2" cornerRadius="5" alpha="1.0" editable="true" enabled="true" borderColor="#4CA9F0" themeColor="#030105"/>
<mx:TextInput x="81" y="152" id="dnivel" width="36" height="21" maxChars="2" backgroundAlpha="1.0" backgroundColor="#F9F600" borderStyle="solid" textAlign="center" borderThickness="2" cornerRadius="5" alpha="1.0" editable="true" enabled="true" borderColor="#4CA9F0" themeColor="#030105"/>
<mx:Button x="25" y="205" label="Enviar" click="userLogin.send();" fontWeight="bold" borderColor="#B7BABC" cornerRadius="7" alpha="0.6"/>
<mx:Button x="94" y="205" label="Limpiar" alpha="0.6" cornerRadius="7"/>
<mx:RadioButtonGroup id="type" itemClick="opciones(event);"/>
<mx:RadioButton groupName="type" id="alta" value="al" label="alta" width="45" x="125" y="152"/>
<mx:RadioButton groupName="type" id="baja" value="ba" label="baja" width="53" x="178" y="152"/>
<mx:RadioButton groupName="type" id="modifica" value="mo" label="modifica" width="75" x="239" y="152"/>
</mx:Canvas>
<mx:Canvas label="efectos" width="100%" height="100%">
<mx:Panel title="WipeUp Effect Example" width="95%" height="95%"
paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
<mx:Text width="100%" color="blue"
text="Use the WipeUp effect to show or hide the text and image."/>
<mx:Label text="Nokia 9930"
fontSize="14"
visible="{cb1.selected}"
hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
<mx:Image source="@Embed(source='images/loldcar.gif')"
visible="{cb1.selected}"
hideEffect="{wipeOut}" showEffect="{wipeIn}"/>
<mx:CheckBox id="cb1" label="visible" selected="true"/>
</mx:Panel>
</mx:Canvas>
</mx:TabNavigator>
</mx:Application>
este el flex.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
$dusuario = "null";
$dclave = "null";
$usu = "null";
$dnivel = "null";
$opcion = "null";
if (isset($_POST['dusuario']) &&
isset($_POST['dclave']) &&
isset($_POST['usu']) &&
isset($_POST['dnivel']))
{
$dusuario = $_POST['dusuario'];
$dclave = $_POST['dclave'];
$usu = $_POST['usu'];
$dnivel = $_POST['dnivel'];
$opcion = $_POST['opcion'];
}
$Return = "<login>";
$Return .= sprintf("Acceso correcto: %s - %s - %s - %s - %s",
$dusuario,
$dclave,
$usu,
$dnivel,
$opcion);
$Return .= "</login>";
print $Return;
?>
Valora esta pregunta


0