Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/11/2007, 08:44
Avatar de juanleonardo
juanleonardo
 
Fecha de Ingreso: agosto-2007
Mensajes: 382
Antigüedad: 16 años, 8 meses
Puntos: 0
PHP y Javascrit

hola amigos tengo una duda.
Este codigo en html anda bien, pero cuando lo quiero poner en php (o sea poniendo echo ""; a todas las lineasy combiando " por ') solo me muestra el menu desplegable.

<form name="jumpy">
<select name="example" size="1" onChange="gone()">
<option value="http://www.yahoo.com" selected>Yahoo.com</option>
<option value="http://www.google.com">Google</option>
<option value="http://www.lycos.com">Lycos</option>
<option value="http://www.AltaVista.com">AltaVista</option>
</select>

<input type="button" name="test" value="Go!" onClick="gone()">
</form>

<script language="javascript">

var displaymode=1
var iframecode='<iframe id="external" style="width:95%;height:400px" src="http://www.yahoo.com"></iframe>'

if (displaymode==1)
document.write(iframecode)

function gone(){
var selectedurl = document.jumpy.example.options[document.jumpy.example.selectedIndex].value
if (document.getElementById && displaymode==1)
document.getElementById("external").src = selectedurl
else
if (document.all&&displaymode==1)
document.all.external.src=selectedurl
else{
if (!window.win2||win2.closed)
win2=window.open(selectedurl)
else{
win2.location=selectedurl
win2.focus()
}
}
}
//-->
</script>
Gracias por la ayuda