-
Form Parameter Undefined
Hi everybody!
I've got a problem with a jsp, which contains a form.
This page has always worked fine, It's the first time I try to midify it, but when I try to go on that page I get this error (using firebug to identify it):
document.prova.flag is undefined
where prova è il form and flag is a parameter.
The error gets raised fro a javascript that tries to set the parameter value:
(I just commented the rest to isolate the possible cause)
Code:
<SCRIPT LANGUAGE="JavaScript">
function view(form){
document.prova.flag.value = 'GC';
//document.all.linkPageDGC.style.display = 'none';
//document.all.NOlinkPageDGC.style.display = '';
//if((abilitazioniUtente.getInserimentoGiroconto()).equals("true")){
//document.all.linkPageGC.style.display = '';
//document.all.NOlinkPageGC.style.display = 'none';
// }
if(GC != null && false){
//document.all.linkPageDGC.style.display = '';
//document.all.NOlinkPageDGC.style.display = 'none';
//document.all.linkPageGC.style.display = 'none';
//document.all.NOlinkPageGC.style.display = '';
document.prova.flag.value = 'GC';
document.prova.flagView.value = 'nuovoGC';
}
}
Following the Form and parameter:
Code:
<form name="prova">
<input type='hidden' name='flag' value=''>
Thanks a lot
Max
-
That's an html/javascript question which has nothing to do with Java.
Ask in a relevant forum.
-
add id to the hidden form element
<input type='hidden' id='flag' name='flag' value=''>
And
in the javascript instead of document.prova.flag.value
use document.getElementById('flag').value
-
Thread not related to Java. Locking.