Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/03/2010, 04:45
TheMostWanted
 
Fecha de Ingreso: marzo-2010
Mensajes: 4
Antigüedad: 14 años, 1 mes
Puntos: 0
Hacer un contro remoto TV tipo Javascript

Hola a todos, soy nuevo en este foro y espero que nos llevemos bien. Tengo un problema ahora: me acaban de poner un trabajo en un instituto de software. El objetivo es hacer un control remoto en el cual, cuando marcamos unos botones, por ejemplo, el 13, nos lleve al canal 13, en este caso, en mi pais es Telecentro. Ahora, el problema esta es que cuando marca los botones, tengo un botón llamado Ir, en el cual me llevara a la pagina web de ese canal, pero este botón Ir no cumple con ese función, no hace nada. Quisiera que me ayudaran a resolver ese problema y que me dijeran . Aqui les dejo el código javascript del contro remoto TV. Copienlo, analicenlo y ayudeneme. ''OJO'' Los unicos canales puestos son el 11, el 13 y el 15, por ahora, cuando se resuelva este problema, pondra otros más.


Código Javascript:
Ver original
  1. <html>
  2. <head></head>
  3. <script language="javascript">
  4. function ir(){
  5. if (pantalla==11){
  6. window.location.href="http://www.telesistema11.tv/";}
  7. else if (pantalla==13){
  8. window.location.href="http://www.telecentro.com.do/";}
  9. else (pantalla==15){
  10. window.location.href="http://www.digital15.com.do/";}
  11. }
  12. </script>
  13. <body bgcolor="aqua">
  14. <font color="white">
  15. <center><h1>Control Remoto</h1><br>
  16. <table border=4>
  17. <form name="remoto">
  18. <tr>
  19. <td><center>
  20. <input type="text" name="pantalla" size="16">
  21. <center><br>
  22. </td>
  23. </tr>
  24. <center>
  25.  <td>
  26.  <table>
  27.        <tr>
  28.         <td><input type="button" name="uno" value="  1  " OnClick="remoto.pantalla.value += '1'"></td>
  29.         <td><input type="button" name="dos" value="  2  " OnClick="remoto.pantalla.value += '2'"></td>
  30.         <td><input type="button" name="tres" value="  3  " OnClick="remoto.pantalla.value += '3'"></td>
  31.        </tr>
  32.  <table>
  33.        <tr>
  34.         <td><input type="button" name="cuatro" value="  4  " OnClick="remoto.pantalla.value += '4'"></td>
  35.         <td><input type="button" name="cinco" value="  5  " OnClick="remoto.pantalla.value += '5'"></td>
  36.         <td><input type="button" name="seis" value="  6  " OnClick="remoto.pantalla.value += '6'"></td>
  37.        </tr>
  38.  <table>
  39.        <tr>
  40.         <td><input type="button" name="siete" value="  7  " OnClick="remoto.pantalla.value += '7'"></td>
  41.         <td><input type="button" name="ocho" value="  8  " OnClick="remoto.pantalla.value += '8'"></td>
  42.         <td><input type="button" name="nueve" value="  9  " OnClick="remoto.pantalla.value += '9'"></td>
  43.        </tr>
  44.  <table>
  45.        <tr>
  46.         <td><input type="button" name="cero" value="  0  " OnClick="remoto.pantalla.value += '0'"></td>
  47.         <td><input type="button" name="ir" value="  Ir  " OnClick="ir()"></td>
  48.        </tr>
  49.  <table>
  50.        <tr>
  51.         <td><input type="button" name="channel +" value="channel +" OnClick=""></td>
  52.         <td><input type="button" name="volumen +" value="volumen +" OnClick=""></td>
  53.         </tr>
  54.  <table>
  55.        <tr>
  56.         <td><input type="button" name="channel -" value="channel -" OnClick=""></td>
  57.         <td><input type="button" name="volumen -" value="volumen -" OnClick=""></td>
  58.         </tr>
  59. </center>
  60. </form>
  61. </body>
  62. </html>



Por favor, ayudenme a resolverlo.