ainoy31 Posted December 7, 2007 Share Posted December 7, 2007 Hello- I have a form the calculates the total dimension weight and chargeable weight. However, these two fields are calculated base on what is entered prior. So, as I enter my measurements, in the total dimension and chargeable fields I see NaN and undefined pop up. However, once I finish entering all my measurements, NaN and undefined goes away and displays the correct results. Does anyone know a fix for this? Much appreciation. AM Quote Link to comment Share on other sites More sharing options...
ainoy31 Posted December 7, 2007 Author Share Posted December 7, 2007 Nevermind. I fixed my issue. The problem was that I was passing in the var result where I am calculating the total. First, I needed to check to see is the var result was null or not. If is was, I need to set my total dimension value to 0. if(result == null) { document.getElementById('tot_dim').value = ''; ....and so on. } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.