nancy_lee
11-20-2002, 06:59 PM
I have coded the following script with the onClick function to call 2 functions :
action.append('<td class="bgMenu"><div class="LinkOnBgMenu" style="text-align:center;padding:2px;padding-bottom:4px;"> <A href="'+db.getFilePath().replace("\\","/")+'/(changeflag)?openAgent&taskID='+taskID+'&login" onClick="validateAndSubmit();SECONDFUNCTION(-2)" class="LinkColorOnBgMenu">go to products</a> </div></td><td width="20"> </td>');
The first one validateandsubmit worked but the second one
has an error message :
document.getElementById("approveFlag").value is Null or not an object ;
Below is the script for SECONDFUNCTION()
function SECONDFUNCTION(flag) {
var flag1 = flag;
document.getElementById("approveFlag").value = flag1;
alert ("***** flag"+flag1);
alert (document.getElementById("approveFlag").value);
}
Please help!
Thanks
action.append('<td class="bgMenu"><div class="LinkOnBgMenu" style="text-align:center;padding:2px;padding-bottom:4px;"> <A href="'+db.getFilePath().replace("\\","/")+'/(changeflag)?openAgent&taskID='+taskID+'&login" onClick="validateAndSubmit();SECONDFUNCTION(-2)" class="LinkColorOnBgMenu">go to products</a> </div></td><td width="20"> </td>');
The first one validateandsubmit worked but the second one
has an error message :
document.getElementById("approveFlag").value is Null or not an object ;
Below is the script for SECONDFUNCTION()
function SECONDFUNCTION(flag) {
var flag1 = flag;
document.getElementById("approveFlag").value = flag1;
alert ("***** flag"+flag1);
alert (document.getElementById("approveFlag").value);
}
Please help!
Thanks