Foros del Web » Creando para Internet » Diseño web »

Radios

Estas en el tema de Radios en el foro de Diseño web en Foros del Web. En el siguiente codigo tengo 2 problemas: 1- Los radios no quieren mostrarme el fieldLabel. 2- Dentro de un fieldSet puedo seleccionar más de un ...
  #1 (permalink)  
Antiguo 11/02/2010, 12:11
 
Fecha de Ingreso: febrero-2010
Mensajes: 2
Antigüedad: 14 años, 1 mes
Puntos: 0
Radios

En el siguiente codigo tengo 2 problemas:
1- Los radios no quieren mostrarme el fieldLabel.
2- Dentro de un fieldSet puedo seleccionar más de un radio y yo solo quiero seleccionar 1.
Ext.BLANK_IMAGE_URL = '../../js/extjs/resources/images/default/s.gif';
Ext.onReady(function(){
Ext.QuickTips.init();

var E = new Array;
var P = new Array;
var I = new Array;

Ext.Ajax.request
({
url: 'obtenerEncuesta',
success: function(datosE)
{
var infoE = datosE.responseText;
var jsonE = eval("(" + infoE + ")");
E = jsonE;

Ext.Ajax.request
({
url: '../Pregunta/gestionarPreguntaEncuesta',
success: function(datosP)
{
var infoP = datosP.responseText;
var jsonP = eval("(" + infoP + ")");
P = jsonP;
Ext.Ajax.request
({
url: 'obtenerIncisosPrgEnc',
success: function(datosI)
{
var infoI = datosI.responseText;
var jsonI = eval("(" + infoI + ")");
I = jsonI;
debugger;
Ext.getCmp('simple').setTitle(E.encuesta[0].nombre);
Ext.getCmp('simple').getComponent('enun').setText( E.encuesta[0].enunciado);
for (i = 0; i < P.count; i++) {
simple.add(new Ext.form.FieldSet({
id:'idP' + i,
width:'auto',
height:'auto'
}));
simple.getComponent('idP' + i).setTitle(P.preguntas[i].enunciado);
for (j = 0; j < I.count; j++) {
if(P.preguntas[i].id == I.incisos[j].id_preg)
{
simple.getComponent('idP' + i).add(new Ext.form.Radio({
id: 'idI'+ j
}));
simple.getComponent('idP' + i).getComponent('idI'+ j).updateBox(new Ext.form.Radio({
id: 'idI'+ j,
boxLabel: I.incisos[j].texto,
labelSeparator: ''
}));
}
}
}
simple.doLayout();
Ext.getCmp('simple').setVisible(true);
}
});
}
});
}
});

var simple = new Ext.FormPanel({
id: 'simple',
frame:true,
width: 'auto',
autoScroll: true,
hidden: true,
height: 798,
renderTo: 'VisualizarEncuesta',
title:'Nombre de la Encuesta',
items: [
new Ext.form.Label({
id:'enun',
width: 'auto'
})
],
buttons:[
{
text:'guardar'
},
{
text:'terminar'
}
]
});
});


Gracias de antemano
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:18.