Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/09/2008, 07:50
Avatar de David
David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Pregunta Respuesta: Error en este script... cual es?

¿No será esto lo que quisiste hacer?
Código PHP:
 var lista = new Array(2);           
 
lista[0] = "('50-LISTA PRECIOS 50','50')";
 
lista[1] = "('2-LISTA 2','2')";

eval(
"window.opener.document.getElementById('lista').options[0]= new Option" lista[0]); 
El tuyo no funcionaba porque lista[0] tomaba el valor 50 por lo que al concatenar se volvía Option50.
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.