esta es la funcion:
Código PHP:
<script>
function MostrarNombre(combo)
{
document.getElementById('RUT').innerHTML=combo.options[combo.selectedIndex].value;
}
</script>
Código PHP:
<? echo '<table border="0" width="80%">'; ?>
<? echo '<tr>'; ?>
<? echo'<td><b><font face="Tahoma" color="#293565" size="2"><div id="RUT" align="right">'.$RUT.'</div></font></td>'; ?>
<? echo '</tr>'; ?>
<? echo '</table>'; ?>
Código PHP:
<select name="select" size="18" id='select' onChange='MostrarNombre(this)'>
<?php
$compara==$select;
include "link.php";
$dblink=mysql_connect($MySqlHostname, $MySqlUsername, $MySqlPassword);
mysql_select_db("$MySqlDatabase");
$sql = "SELECT DISTINCT CORRELATIVO , PATERNO , MATERNO, RUT, DV, EDADACTUAL, PROMCAST7, PROMMAT7, PROMCAST8, PROMMAT8, NCURREP, TIENEPATROCINIO , NOMBRES FROM POSTULANTE ORDER BY PATERNO";
$query = mysql_query($sql, $dblink);
while ($row = mysql_fetch_array($query))
{
$PATERNOZ = $row['PATERNO'];
$MATERNOZ = $row['MATERNO'];
$NOMBRESZ = $row['NOMBRES'];
$CORR = $row['CORRELATIVO'];
$RUTZ = $row['RUT'];
$DVZ = $row['DV'];
$EDADACTUAL = $row['EDADACTUAL'];
$PROMCAST7 = $row['PROMCAST7'];
$PROMMAT7 = $row['PROMMAT7'];
$PROMCAST8 = $row['PROMCAST8'];
$PROMMAT8 = $row['PROMMAT8'];
$NCURREP = $row['NCURREP'];
$TIENEPATROCINIO = $row['TIENEPATROCINIO'];
$sqll="SELECT * FROM FACTORES_TP";
$queryy=@mysql_query($sqll, $dblink);
while ($row = mysql_fetch_array($queryy))
{
$FTP_PEDAD13 = $row['FTP_PEDAD13'];
$FTP_PEDAD14 = $row['FTP_PEDAD14'];
$FTP_PEDAD15 = $row['FTP_PEDAD15'];
$FTP_PEDAD16 = $row['FTP_PEDAD16'];
$FTP_PEDAD17 = $row['FTP_PEDAD17'];
$FTP_F1 = $row['FTP_F1'];
$FTP_MENOSVALOR = $row['FTP_MENOSVALOR'];
$FTP_DIVVALOR = $row['FTP_DIVVALOR']; //100
$FTP_F2 = $row['FTP_F2'];
$FTP_F3 = $row['FTP_F3'];
$FTP_F4 = $row['FTP_F4'];
$FTP_F5 = $row['FTP_F5'];
$FTP_F6 = $row['FTP_F6'];
$FTP_PCURREP0 = $row['FTP_PCURREP0'];
$FTP_PCURREP1 = $row['FTP_PCURREP1'];
$FTP_PCURREP2 = $row['FTP_PCURREP2'];
$FTP_FAE = $row['FTP_FAE'];
$FTP_FTP = $row['FTP_FTP'];
$FTP_N_ACEPTADOS_PROX = $row['FTP_N_ACEPTADOS_PROX'];
}
ojala me puedan dar una orientacion gracias a todos