Ok, ahí va el código:
Funciones que se llaman via "onclick" en dos botones distintos:
Función 1
Código:
function advertencia_risk(risk){
var name;
name='risk'+risk;
netejar_sms();
document.getElementById("lorisc").value=risk;
document.getElementById("adver_elimi").style.display='';
if(roig != ''){
document.getElementById(roig).style.backgroundColor='';
}
roig=name;
document.getElementById(name).style.backgroundColor='#FF0000';
document.getElementById("adver_elimi").style.display='block';
}
Función 2
Código:
function deleted_risk()
{
document.getElementById("adver_elimi02").style.display='block';
}
Lugar donde se llaman a estas funciones:
Código:
<td id="riskelim<?php echo $row3["id"]; ?>" onmouseover="className='sobre4'" onmouseout="className='fora'" onclick="advertencia_risk('<?php echo $row3["id"]; ?>'); netejar();" style="cursor:hand" width="21" >
Código:
<td onclick="deleted_risk()" width="50" >
I los dos divs:
Código:
<div id="adver_elimi" style="display:none;position: absolute; width: 449px; height: 210px; z-index: 3; left: 221px; top: 178px; border: 2px solid #000000; background-color: #FFFFFF" >
<table border="0" width="100%" style="border-collapse: collapse; border: 0px solid #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" bordercolor="#000000" id="table1" height="132">
<tr class="fonsdegradat">
<td width="5%"></td>
<td width="574">
<table border="0" width="94%" style="border-collapse: collapse;" id="table1">
<tr>
<td colspan="5">
<span class="text08"> </span>
</td>
</tr>
<tr>
<td colspan="5">
<table border="0" width="102%" style="border-collapse: collapse">
<tr>
<td width="13%" style="border-bottom: 2px solid #000000">
<p align="center">
<img border="0" src="../../../imagenes/riesgos.gif" width="30" height="30" align="center"></td>
<td style="border-bottom: 2px solid #000000" width="348">
<h1>ADVERTENCIA</h1>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="5">
</td>
</tr>
<tr>
<td height="26" colspan="5" >
<table border="0" width="100%" id="table116">
<tr>
<td width="38">
<p align="center"> </td>
<td width="316">
<p align="center"><b><font face="Arial" size="2">¿ESTÁ
SEGURO QUE QUIERE ELIMINAR ESTE RIESGO? </font></b></td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="99%" colspan="5"> </td>
</tr>
<tr id="acceptar">
<td width="11%" >
</td>
<td style="border: 1px solid #808080; cursor:hand; " onmouseover="bgColor='#FCFA72'" onmouseout="bgColor=''" onclick="acceptar_advertencia_eva()" width="31%" >
<table border="0" width="100%" id="table117">
<tr>
<td width="33">
<p align="center">
<img border="0" src="../../../imagenes/aceptar.gif" width="25" height="25"></td>
<td><p align="center"> <span style="font-weight: 700; font-size: 8pt">Aceptar</span></td>
</tr>
</table>
</td>
<td width="16%">
</td>
<td style="border: 1px solid #808080; cursor:hand; " onmouseover="bgColor='#FCFA72'" onmouseout="bgColor=''" onclick="tancar_advertencia_eva()" width="31%">
<table border="0" width="100%" id="table118">
<tr>
<td width="31">
<p align="center">
<img border="0" src="../../../imagenes/cancelar.gif" width="25" height="25"></td>
<td><p align="center"> <span style="font-weight: 700; font-size: 8pt">Cancelar</span></td>
</tr>
</table>
</td>
<td width="8%" height="34">
</td>
</tr>
<tr>
<td width="99%" colspan="5"> </td>
</tr>
</table>
</div>
<div id="adver_elimi02" style="display:none;position: absolute; width: 449px; height: 210px; z-index: 3; left: 221px; top: 178px; border: 2px solid #000000; background-color: #FFFFFF" >
<table border="0" width="100%" style="border-collapse: collapse; border: 0px solid #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" bordercolor="#000000" id="table1" height="132">
<tr class="fonsdegradat">
<td width="5%"></td>
<td width="574">
<table border="0" width="94%" style="border-collapse: collapse;" id="table1">
<tr>
<td colspan="5">
<span class="text08"> </span>
</td>
</tr>
<tr>
<td colspan="5">
<table border="0" width="102%" style="border-collapse: collapse">
<tr>
<td width="13%" style="border-bottom: 2px solid #000000">
<p align="center">
<img border="0" src="../../../imagenes/riesgos.gif" width="30" height="30" align="center"></td>
<td style="border-bottom: 2px solid #000000" width="348">
<h1>ADVERTENCIA</h1>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="5">
</td>
</tr>
<tr>
<td height="26" colspan="5" >
<table border="0" width="100%" id="table116">
<tr>
<td width="38">
<p align="center"> </td>
<td width="316">
<p align="center"><b><font face="Arial" size="2">¿ESTÁ
SEGURO QUE QUIERE ELIMINAR ESTE RIESGO? </font></b></td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="99%" colspan="5"> </td>
</tr>
<tr id="acceptar">
<td width="11%" >
</td>
<td style="border: 1px solid #808080; cursor:hand; " onmouseover="bgColor='#FCFA72'" onmouseout="bgColor=''" onclick="acceptar_advertencia_eva()" width="31%" >
<table border="0" width="100%" id="table117">
<tr>
<td width="33">
<p align="center">
<img border="0" src="../../../imagenes/aceptar.gif" width="25" height="25"></td>
<td><p align="center"> <span style="font-weight: 700; font-size: 8pt">Aceptar</span></td>
</tr>
</table>
</td>
<td width="16%">
</td>
<td style="border: 1px solid #808080; cursor:hand; " onmouseover="bgColor='#FCFA72'" onmouseout="bgColor=''" onclick="tancar_advertencia_eva()" width="31%">
<table border="0" width="100%" id="table118">
<tr>
<td width="31">
<p align="center">
<img border="0" src="../../../imagenes/cancelar.gif" width="25" height="25"></td>
<td><p align="center"> <span style="font-weight: 700; font-size: 8pt">Cancelar</span></td>
</tr>
</table>
</td>
<td width="8%" height="34">
</td>
</tr>
<tr>
<td width="99%" colspan="5"> </td>
</tr>
</table>
</div>
Bueno a ver si os sirve de más. Muchas gracias. Llevo ya un buen rato con esto y estoy harto!!XD.
Gracias