![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
03/07/2008, 22:38
|
![Avatar de GatorV](http://static.forosdelweb.com/customavatars/avatar138775_9.gif) | $this->role('moderador'); | | Fecha de Ingreso: mayo-2006 Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años, 8 meses Puntos: 2135 | |
Respuesta: texto dependiente de un combo Hola linkin y alfil123,
Si usan Prototype pueden hacer algo así:
Código:
<select onchange="getData(this);">
</select>
<input type="text" name="precio" id="resultText" />
<script type="text/javascript">
function getData(cbo) {
var option = cbo.value;
var pars = "opcion=" + option;
var req = new Ajax.request( "/script.php", {
method: "get",
parameters: pars,
onComplete: function(transport) {
$('resultText').value = transport.responseText;
}
});
}
</script>
Saludos. |