Lisawynn
04-29-2004, 09:26 PM
Okay. I am still having difficulty with a script I previously posted here (http://www.codingforums.com/showthread.php?t=37609) although I have made quite a few changes to that script to get it to run correctly except for this last issue. I cannot for the life of me get the taxes and grandtotal text fields to become empty when the Total fields revert back to 0. I have tried this:
function gettaxandtotal(){
if((document.form6.printertotal.value="0")&&(document.form6.monitor.value="0")&&
(document.form6.computertotal.value="0"))
{
document.form6.taxes.value=""
document.form6.grandtotal.value=""
}
}
But that does not seem to work. I tried using an if statement which would trigger a "" value for the taxes and grandtotal text fields when the selects return to their original values but that didn't work. I am using an onChange event handler to trigger this function. I tried moving the onChange to different text fields and that is not working. I tried using onBlur but that didn't work either. Should I be using a different event handler? Everything else in the script is now working great. I don't know what I am doing wrong. Any assistance/suggestions would be appreciated. Thank you.
function gettaxandtotal(){
if((document.form6.printertotal.value="0")&&(document.form6.monitor.value="0")&&
(document.form6.computertotal.value="0"))
{
document.form6.taxes.value=""
document.form6.grandtotal.value=""
}
}
But that does not seem to work. I tried using an if statement which would trigger a "" value for the taxes and grandtotal text fields when the selects return to their original values but that didn't work. I am using an onChange event handler to trigger this function. I tried moving the onChange to different text fields and that is not working. I tried using onBlur but that didn't work either. Should I be using a different event handler? Everything else in the script is now working great. I don't know what I am doing wrong. Any assistance/suggestions would be appreciated. Thank you.