function outputCustRowsHtml(data){
                    for(var i = 0; i < data.length; i++){

                        document.write("<tr>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].customerId + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].discountCode.discountCode +"</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].name + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].addressline1 + " " + data[i].addressline2 + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].city + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].state + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].zip.zipCode + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].phone + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].fax + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].email + "</td>");
                        document.write("</tr>");
                    }
                }
//Helper function to go throught all the rows in the customer table and output it to the browser
Helper function to go throught all the rows in the customer table and output it to the browser
Helper function to go throught all the rows in the customer table and output it to the browser
function outputCustRowsHtml(data){
                    for(var i = 0; i < data.length; i++){
                        document.write("<tr>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].customerId + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].discountCode.discountCode +"</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].name + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].addressline1 + " " + data[i].addressline2 + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].city + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].state + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].zip.zipCode + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].phone + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].fax + "</td>");
                        document.write("<td style='border: 1px solid black;'>" + data[i].email + "</td>");
                        document.write("</tr>");
                    }
                }
function outputCustRowsHtml ( data ) { for ( var i = 0 ; i < data . length ; i ++ ) { document . write ( "<tr>" ) ; document . write ( "<td style='border: 1px solid black;'>" + data [ i ] . customerId + "</td>" ) ; document . write ( "<td style='border: 1px solid black;'>" + data [ i ] . discountCode . discountCode + "</td>" ) ; document . write ( "<td style='border: 1px solid black;'>" + data [ i ] . name + "</td>" ) ; document . write ( "<td style='border: 1px solid black;'>" + data [ i ] . addressline1 + " " + data [ i ] . addressline2 + "</td>" ) ; document . write ( "<td style='border: 1px solid black;'>" + data [ i ] . city + "</td>" ) ; document . write ( "<td style='border: 1px solid black;'>" + data [ i ] . state + "</td>" ) ; document . write ( "<td style='border: 1px solid black;'>" + data [ i ] . zip . zipCode + "</td>" ) ; document . write ( "<td style='border: 1px solid black;'>" + data [ i ] . phone + "</td>" ) ; document . write ( "<td style='border: 1px solid black;'>" + data [ i ] . fax + "</td>" ) ; document . write ( "<td style='border: 1px solid black;'>" + data [ i ] . email + "</td>" ) ; document . write ( "</tr>" ) ; } }
Helper function to go throught all the rows in the customer table and output it to the browser
Helper function to go throught all the rows in the customer table and output it to the browser