Ver Mensaje Individual
  #13 (permalink)  
Antiguo 18/05/2009, 13:53
Avatar de buzu
buzu
 
Fecha de Ingreso: octubre-2006
Ubicación: San Francisco, CA
Mensajes: 2.168
Antigüedad: 17 años, 7 meses
Puntos: 122
Respuesta: Captura de Datos desde Ventana Flotante

Código html:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4.     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  5.     <title>Untitled</title>
  6.      <script type="text/javascript">
  7. var fondo = false;
  8. var mensaje = false;
  9. function creaVentana(){
  10. fondo = document.createElement('div');
  11. mensaje = document.createElement('div');
  12. fondo.setAttribute('id','fondo');
  13. mensaje.setAttribute('id','msg');
  14. document.getElementsByTagName('body')[0].appendChild(fondo);
  15. document.getElementsByTagName('body')[0].appendChild(mensaje);
  16. mensaje.innerHTML="<div class='superior'><span class='cerrar' title='Cerrar' onclick='cerrar();'>X<\/span><\/div><table width='200'><tr><td><label><input type='radio' name='KFC Opciones' value='KFC1'>KFC1<\/label><\/td><\/tr><tr><td><label><input type='radio' name='KFC Opciones' value='KFC2'>KFC2<\/label><\/td><\/tr><tr><td><label><input type='radio' name='KFC Opciones' value='KFC3'>KFC3<\/ label><\/td><\/tr><\/table><p><\/p>";
  17. }
  18. function cerrar(){
  19. document.getElementsByTagName('body')[0].removeChild(fondo);
  20. document.getElementsByTagName('body')[0].removeChild(mensaje);
  21. fondo=false;
  22. mensaje=false;
  23. }
  24. window.onload = creaVentana;
  25.     </script>
  26. </head>
  27.  
  28. </body>
  29. </html>

El problema es que estabas poniendo enters entre la cadena. No puedes hacer eso. Las cadenas deben ir en la misma linea.

Saludos.
__________________
twitter: @imbuzu