A
alf
Please tell me why I get a NaN returned in my Javascript from :-
IssuedValue = document.getElementById("IssuedValue").value;
OutstandingValue = document.getElementById("OutstandingValue").value;
document.getElementById("IssuedValue").value = IssuedValue +
OutstandingValue;
document.getElementById("IssuedValue").value ends up being a NaN, why?
Those two values are ex a MSSQL database.
The web page calls Ajax to repopulate its fields by calling a PHP
program. This step works fine.
Next step is when the user clicks an install button Ajax is again
called which in turn calls a PHP script on the server to update the
database and on return from the PHP to Ajax I wish to alter those two
fields so that I can call a Javascript function to print the displayed
data.
However at this point the data on the screen is what is going to
happen and I need this to change(the database has been updated) to
what has happened. IssuedValue needs to be updated to what was altered
in the database.
BTW The database is reflecting the correct information. So now the
only issue is to get the printout to reflect the correct data.
IssuedValue = document.getElementById("IssuedValue").value;
OutstandingValue = document.getElementById("OutstandingValue").value;
document.getElementById("IssuedValue").value = IssuedValue +
OutstandingValue;
document.getElementById("IssuedValue").value ends up being a NaN, why?
Those two values are ex a MSSQL database.
The web page calls Ajax to repopulate its fields by calling a PHP
program. This step works fine.
Next step is when the user clicks an install button Ajax is again
called which in turn calls a PHP script on the server to update the
database and on return from the PHP to Ajax I wish to alter those two
fields so that I can call a Javascript function to print the displayed
data.
However at this point the data on the screen is what is going to
happen and I need this to change(the database has been updated) to
what has happened. IssuedValue needs to be updated to what was altered
in the database.
BTW The database is reflecting the correct information. So now the
only issue is to get the printout to reflect the correct data.