codice:
response.write " <table width=910 cellspacing=0 cellpadding=0>" & VbCrLf
response.write " <tr>" & VbCrLf
response.write " <td class='LM'></td>" & VbCrLf
response.write " <td width=855>" & VbCrLf
response.write " <table>" & VbCrLf
response.write " <tr>" & VbCrLf
response.write " <td width=5></td>" & VbCrLf
response.write " <td>" & VbCrLf
response.write " <input class='campo8' value='" & tCCP & "' readonly" & BackCol & " tabindex=-1 style='width:120'>" & VbCrLf
response.write " <input class='campo7' value='" & tCAP & "' readonly" & BackCol & " tabindex=-1 style='width:80'>" & VbCrLf
response.write " <input class='campo9' value='" & tIMP & "' readonly" & BackCol & " tabindex=-1 style='width:136'>" & VbCrLf
response.write " <input class='campo7' value='" & tCaus & "' readonly" & BackCol & " tabindex=-1 style='width:220'>" & VbCrLf
response.write " <input class='campo7' value='" & tVERS & "' readonly" & BackCol & " tabindex=-1 style='width:220'>" & VbCrLf
response.write " <input type=""button"" class=""menu"" onclick=""ToggleDiv('div_"&record("id")&"')"" value=""W"/>"
' stringa per aprire i PDF con frame al volo
response.write "<div id=""div_"&record("id")&""" class=""div_pdf"" >"
response.write "<iframe src=""BOLL/" & tIMG & ".pdf"" width=""600"" height=""300""></iframe>"
response.write "</div>"
response.write " </td>" & VbCrLf
response.write " <td width=5></td>" & VbCrLf
response.write " </tr>" & VbCrLf
response.write " </table>" & VbCrLf
response.write " </td>" & VbCrLf
response.write " <td class='RM'></td>" & VbCrLf
response.write " </tr>" & VbCrLf
response.write " </table>" & VbCrLf
record = id della tabella per avere un dato univoco.
Meglio non usare l'apice ' come delimitatore meglio raddoppiate le virgolette "" sintassi corretta per asp.
Visto che forzi il display non con jquery (che comunque andrebbe rivisto per eseguirlo su tutti i div della tabella) ho optato per una soluzione css.
nella head:
codice:
<style type="text/css">
.div_pdf {
display: none;
}
</style>
<script type="text/javascript">
function ToggleDiv(IDiv){
$("#"+IDiv).slideToggle(700);
}
</script>
Chiaramente questo soluzione non aprirà/chiuderà i div simultaneamente (div1 aperto clicco su div2 apre div2 e chiudo div1) ma gestirà i singoli div separatamente.
P.S. Perché apri una nuova discussione identica?
P.S.S. Quando nella risposta ci sono delle "richieste" cerca di soddisfarle (nel limite del possibile), è nel tuo interesse molti utenti si infastidiscono perché sembra che non li "ascolti".