Dear all ,
I am trying to build a new software using nuBuilder latest version but seem stuck upon some problems as shown in the screenshot below. help would be appreciated. Thanks
The error screenshot 1 occurs when screenshot 2 is executed
my invoice JavaScript form is as below for the invoice shown in screenshot3 :
function nuLoadThis() {
calcinv_total();
}
function nuBeforeSave(){
if ( !validateCloseDate() )
return false;
calcinv_total();
return true;
}
function calclinetotal(pthis) {
if (pthis.length == 18) {
// Parameter passed through from tri_product_id
PRE = pthis;
} else {
// Parameter passed through from tri_units or tri_cost
PRE = pthis.name.substring(0,18);
}
unitCost = Number(document.getElementById(PRE+'tri_unit_cost').value);
discountCost = Number(document.getElementById(PRE+'tri_discount').value);
calcinv_total();
}
function calcinv_total() {
//calculate the entire total of all the line totals
theRows = Number(document.getElementById('rowsCourses_Invoice').value);
invAmount = '0';
invTax = '0';
//for every line...
for (int = 0;int < theRows; ++int) {
strlength = '0000'+int;
pstrlength = strlength.length;
PRE = 'Courses_Invoice' + ('0000'+int).substring(pstrlength-4);
price = Number(document.getElementById(PRE+'tri_discount').value);
//if delete is not checked then add prices
if (document.getElementById("row"+PRE).checked != true) {
invAmount = Number(invAmount) + price;
nuFormat(document.getElementById(PRE+'tri_discount'));
//else set to zero and don't add
}
}
document.getElementById('tra_amount').value = invAmount;
nuFormat(document.getElementById('tra_amount'));
}
function getRowPrefixFromLookup(pthis) {
// Needed to update row price totals if user changes a product lookup
PRE = pthis.name.substring(4,22);
nuCreateCookie('row_name_for_transaction_item', PRE, 0);
calclinetotal(nuReadCookie('row_name_for_transaction_item'));
}
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Strange Java Script Problem
-
- Posts: 32
- Joined: Thu Sep 02, 2010 11:19 am
Strange Java Script Problem
You do not have the required permissions to view the files attached to this post.
Re: Strange Java Script Problem
at_rcc,
Where is the function createJavaScriptSharedFunctions()?
Steven
Where is the function createJavaScriptSharedFunctions()?
Steven
-
- Posts: 32
- Joined: Thu Sep 02, 2010 11:19 am
Re: Strange Java Script Problem
at_rcc,
Before Open is for PHP, it can't call JavaScript from Javascript
Steven
Before Open is for PHP, it can't call JavaScript from Javascript
Steven