ciao ho questo codice in una pagina aspx
function stampa(){
//accende le note e le firme
document.all["lblIntFirmaCliente"].style.display = ""
document.all["lblIntFirmaTecnico"].style.display = ""
document.all["lblFirmaCliente"].style.display = ""
document.all["lblFirmaTecnico"].style.display = ""
document.all["lblNoteFM"].style.display = ""
document.all["lblTxtNoteFM"].style.display = ""
document.all["lblNoteT"].style.display = ""
document.all["lblTxtNoteT"].style.display = ""
document.all["lblNoteInterv"].style.display = ""
document.all["lblTxtNoteInterv"].style.display = ""
var obj_chb = document.all["lblCheckReclamo"]
if(obj_chb)
{
document.all["chbReclamo"].style.display = ""
document.all["lblCheckReclamo"].style.display = ""
}
else
{
document.all["chbReclamo"].style.display = "none"
document.all["lblCheckReclamo"].style.display = "none"
}
window.print();
}
mi dice che non trova l'oggetto chbReclamo, che invece c'è. è dichiarato e usato
se commento l'if mi funziona correttamente se invece "discommento" l'if mi da l'errore