• Jueves 18 de Abril de 2024, 10:00

Autor Tema:  Re: Paginas Dentro De Otra Paginas  (Leído 1814 veces)

cinkey

  • Miembro activo
  • **
  • Mensajes: 83
    • Ver Perfil
Re: Paginas Dentro De Otra Paginas
« en: Miércoles 5 de Diciembre de 2007, 00:33 »
0
disculpen las molestias pero tengo esta pagina.
Código: Text
  1.  
  2. <?php
  3. $link=mysql_connect("localhost","root");
  4. mysql_selectdb("clinica",$link);
  5. ?>
  6. <html>
  7. <head>
  8. <style>
  9. .MunPelot {background-color:#306396; color:#FFFFFF; font-family:"Times New Roman"; font-style:bold; font-size:12pt}
  10. </style>
  11. <script LANGUAGE="JavaScript">[CODE]
  12. //bloquear el click derecho
  13. var sMensaje = 'Botón derecho deshabilitado';
  14.  
  15.   function anularBotonDerecho(e) {
  16.  
  17.     if (navigator.appName == 'Netscape'
  18.        && (e.which == 3 || e.which ==    2)){
  19.       alert(sMensaje);
  20.       return false;
  21.     } else if (navigator.appName == 'Microsoft Internet Explorer'
  22.         && (event.button    == 2)) {
  23.       alert(sMensaje);
  24.     }
  25.   }
  26.  
  27.   document.onmousedown=anularBotonDerecho;
  28.   document.oncontextmenu=new Function("return false");
  29.  
  30. function validarBotonRadio() {
  31. var i
  32. var radio
  33.     for (i=0;i<document.formulario.cie.length;i++){
  34.        if (document.formulario.cie[i].checked)
  35.       break;
  36.       }
  37.      //document.formulario.busca.value = " ";
  38.        return (i);
  39. }
  40.  
  41.  function corresponderb()
  42. {
  43.     document.listades.cie10.selectedIndex=document.listades.nombre.selectedIndex;
  44. }  
  45. function padre(){
  46.  
  47. var indice=document.listades.cie10.selectedIndex;
  48.   window.opener.document.diagnosticos.Descripcion[dir-1].value = document.listades.nombre.options[indice].value;
  49.   window.opener.document.diagnosticos.cie10[dir-1].value = document.listades.cie10.options[indice].value
  50.  
  51.   }
  52. </SCRIPT>
  53. <title>Catalogo CIE-10</title>
  54. </head>
  55. <body onLoad="sendData('id='+this.value,'untitled-21.php')">
  56. <form name="formulario" id="form1" onClick="validarBotonRadio(); dimeActivo('cie')" >
  57.   <font color="#306396"><strong>       Buscar por:
  58.        
  59.   <input name="cie" type="radio" checked value="0">
  60.     Clave    
  61.   <input type="radio" name="cie" value="1">
  62.     Nombre <br>
  63.        
  64.   <input name="busca" type="text" tabindex="3" size="100" maxlength="100" onClick="sendData('id='+this.value,'untitled-21.php')" onkeyup="sendData('id='+this.value,'untitled-21.php')">
  65.   </strong></font>
  66. </form>
  67. <div id="contenu"></div>
  68. <script type="text/javascript">
  69. /**
  70. * Permet d'envoyer des données en GET ou POST en utilisant les XmlHttpRequest
  71. */
  72. function sendData(param, page)
  73. {
  74. if(document.all)
  75. {
  76. //Internet Explorer
  77. var XhrObj = new ActiveXObject("Microsoft.XMLHTTP")&#59;
  78. }//fin if
  79. else
  80. {
  81. //Mozilla
  82. var XhrObj = new XMLHttpRequest();
  83. }//fin else
  84.  
  85. //définition de l'endroit d'affichage:
  86. var content = document.getElementById("contenu");
  87.  
  88. XhrObj.open("POST", page);
  89.  
  90. //Ok pour la page cible
  91. XhrObj.onreadystatechange = function()
  92. {
  93. if (XhrObj.readyState == 4 && XhrObj.status == 200)
  94. content.innerHTML = XhrObj.responseText&#59;
  95. }
  96.  
  97. XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
  98. XhrObj.send(param);
  99. }//fin fonction SendData
  100.  
  101. </script>
  102. <script LANGUAGE="JavaScript">
  103.       function volve(){
  104.       javascript:history.go(-1);
  105.       }
  106. </SCRIPT>
  107. </body>
  108. </html>
  109.  
  110.  
pagina dos
Código: Text
  1.  
  2. <?php
  3. $link=mysql_connect("localhost","root");
  4. mysql_selectdb("clinica",$link);
  5. // test des POST emis
  6. if(isset($_POST['id']) && !empty($_POST['id']) ){
  7. $coddia=$_POST['id'];
  8. $cuanto=strlen($coddia);
  9. $resultado=mysql_query("select d.*from enfermedad d where SUBSTRING(d.descripcion,1,$cuanto) LIKE '$coddia'",$link);
  10. $resultado1=mysql_query("select d.*from enfermedad d where SUBSTRING(d.descripcion,1,$cuanto) LIKE '$coddia'",$link);
  11. }
  12. ?>
  13. <html><body>
  14. <style>
  15. .MunPelot {background-color:#306396; color:#FFFFFF; font-family:"Times New Roman"; font-style:bold; font-size:12pt}
  16. </style>
  17. <script LANGUAGE="JavaScript">
  18. function corres()
  19. { alert(x);
  20.     document.listagrande.nombre.selectedIndex=document.listagrande.cie10.selectedIndex;
  21. }  
  22. function corresb()
  23. {
  24.     document.listagrande.cie10.selectedIndex=document.listagrande.nombre.selectedIndex;
  25. }  
  26. </SCRIPT>
  27.  
  28.  <table border='2' bordercolor='#306396'>
  29.  <td width='20%' valign='top' bordercolor='#306396'>
  30.    <form name='catalogo'>
  31.    <input name='A00-B99' type='button' style='width:100%' class='MunPelot' value='Infecciones y Parasitarias' onClick='buscar2('A00','B99','(A00-B99) Ciertas infecciones y enfermedades parasitarias');'>
  32.    <input name='C00-D48' style='width:100%' type='button' class='MunPelot' value='Neoplasias' onClick='buscar2('C00','D48','(C00-D48) Neoplasias');'>
  33.    <input name='D50-D89' style='width:100%' type='button' class='MunPelot' value='Sangre' onClick='buscar2('D50','D89','(D50-D89) Enfermedades de la sangre y del tejido hematopoyético, y algunas alteraciones inmunes');'>
  34.    <input name='E00-E90' style='width:100%'  type='button' class='MunPelot' value='Endocrinas' onClick='buscar2('E00','E90*','(E00-E90) Enfermedades endocrinas, nutricionales y metabólicas');'>
  35.    <input name='F00-F99' style='width:100%' type='button' class='MunPelot' value='Trastornos mentales' onClick='buscar2('F01','F99','(F00-F99) Trastornos mentales y del comportamiento');'>
  36.    <input name='G00-G99' style='width:100%' type='button' class='MunPelot' value='Sistema Nervioso' onClick='buscar2('G00','G99.8*','(G00-G99) Enfermedades del sistema nervioso');'>
  37.    <input name='H00-H59' style='width:100%' type='button' class='MunPelot' value='Ojos' onClick='buscar2('H00','H59','(H00-H59) Enfermedades del ojo y anejos oculares');'>
  38.    <input name='H60-H95' style='width:100%' type='button' class='MunPelot' value='Oídos' onClick='buscar2('H60','H95','(H60-H95) Enfermedades del oído y procesos mastoideos');'>
  39.    <input name='I00-I99' style='width:100%' type='button' class='MunPelot' value='Sistema Circulatorio' onClick='buscar2('I00','I99','(I00-I99) Enfermedades del sistema circulatorio');'>
  40.    <input name='J00-J99' style='width:100%' type='button' class='MunPelot' value='Sistema Respiratorio' onClick='buscar2('J00','J99.8*',' (J00-J99) Enfermedades del sistema respiratorio');'>
  41.    <input name='K00-K93' style='width:100%' type='button' class='MunPelot' value='Aparato Digestivo' onClick='buscar2('K00','K93.8*','(K00-K93) Enfermedades del aparato digestivo');'>
  42.    <input name='L00-L99' style='width:100%' type='button' class='MunPelot' value='Piel' onClick='buscar2('L00','L99.8*','(L00-L99) Enfermedades de la piel y el tejido subcutáneo');'>
  43.    <input name='M00-M99' style='width:100%' type='button' class='MunPelot' value='Sistema Musculoesquelético' onClick='buscar2('M00','M99','(M00-M99) Enfermedades del sistema musculoesquelético y del tejido conectivo');'>
  44.    <input name='N00-N99' style='width:100%' type='button' class='MunPelot' value='Aparato Genitourinario' onClick='buscar2('N00','N99','(N00-N99) Enfermedades del aparato genitourinario (nefrología y urología)');'>
  45.    <input name='O00-O99' style='width:100%' type='button' class='MunPelot' value='Embarazo, parto y puerperio' onClick='buscar2('O00','O99','(O00-O99) Embarazo, parto y puerperio');'>
  46.    <input name='P00-P99' style='width:100%' type='button' class='MunPelot' value='Perinatal' onClick='buscar2('P00','P96.9','(P00-P96) Algunas condiciones originadas en el periodo perinatal');'>
  47.    <input name='Q00-Q99' style='width:100%' type='button' class='MunPelot' value='Malformaciones' onClick='buscar2('Q00','Q99','(Q00-Q99) Malformaciones congénitas, deformaciones y aberraciones cromosómicas');'>
  48.    <input name='R00-R99' style='width:100%' type='button' class='MunPelot' value='Sintomas' onClick='buscar2('R00','R99','(R00-R99) Síntomas, signos y hallazgos clínicos y de laboratorio, no clasificados en otro lugar');'>
  49.    <input name='S00-T98' style='width:100%' type='button' class='MunPelot' value='Daño, envenenamiento' onClick='buscar2('S00','T98','(S00-T98) Daño, envenenamiento, y otras consecuencias de causas externas');'>
  50.    <input name='V01-Y98' style='width:100%' type='button' class='MunPelot' value='Causas Mortalidad' onClick='buscar2('V01','V98','(V01-Y98) Causas externas de morbilidad y mortalidad');'>
  51.    <input name='Z00-Z99' style='width:100%' type='button' class='MunPelot' value='Factores Salud' onClick='buscar2('Z00','Z99','(Z00-Z99) Factores que influyen en el estado de salud y el contacto con los Servicios Sanitarios');'>
  52.  </form>
  53.  </td>
  54.  <td width='80%'>
  55.  <form name='listagrande' id='listagrande' method='post'>
  56.  <table bordercolor='#306396' border='1'>
  57.  <tr bordercolor='#306396'>
  58.  <tr valign='top'>
  59.  <th valign='top'  bordercolor='#306396' colspan='2' aling='center'>
  60.  <select name='cie101' size='15' style='width:720px;' tabindex='1'></select>
  61.  </th>
  62.  </tr>
  63.  <tr valign='baseline'>
  64.  <td valign='baseline' bordercolor='#306396'><div align='center'><font color='#306396'><strong>CIE 10</strong></font></div>
  65. <select id="cie10" name="cie10" size="10" style="width:100px" onChange="corres()">
  66. <?php while($row = mysql_fetch_array($resultado)){echo "<OPTION value='$row[0]'>$row[0]</OPTION>";} ?>
  67. </select></td>
  68. <td valign='baseline' bordercolor='#306396'><div align='center'><font color='#306396'><strong>NOMBRE</strong></font></div>
  69. <select id='nombre' name='nombre' size='10' style='width:620px' onChange="corresb()">
  70. <?php while($row1 = mysql_fetch_array($resultado1)){echo "<OPTION value='$row1[0]'>$row1[0]</OPTION>";} ?>
  71. </select></td>
  72.  
  73. </tr>
  74. </table>
  75. </form>
  76. </td>
  77. </table>
  78. </body></html>
  79.  
  80.  
lo que pasa:
1 esque no puedo hacer que sea un cie10 y nombre sean listas encadenadas
intento hacerlo con java pero ahi en la funcion no se qeu mas hacer por que se supone que al escoger alguno de la lista esta me tiene qeu seleccionar su par aen la otra por ejemplo selecciono el codigo a00 en descripcion me tiene qeu ostrar cual es el nombre pero no me sale con java sera pro qei esta en otra pagina
2 este valor seleccionado tiene qeu cargarse en otra pagina pero no se como llevaro a la pagina eh intentado el opener pero no me sirve de mucho
les agradeceria su ayuda