" + newline ; // need to split the script bit here or it thinks this is the end of the script section!! result_str += newline + "" + newline + newline + ""; result_str += newline + newline + "" + newline; // ---- vendor name field ------------------------------------------------------------------------- if ( document.form1.vendor_name.value == "" ) { alert("Vendor name must be entered.."); return; } result_str += tab_str + "" + newline ; // ---- determine all information fields ---------------------------------------------------------- // ---- they don't need to be suppressed, but they are for the moment! if ( !document.form1.Billing_address1.checked ) { alert("Billing_address line 1 must be entered.."); return; } // --------- Billing_information fields ------- information_str += "Billing_name"; //suppress_str += "Billing_name"; if ( document.form1.Billing_address1.checked ) { information_str += ",Billing_address1"; //suppress_str += ",Billing_address1"; } if ( document.form1.Billing_address2.checked ) { information_str += ",Billing_address2"; //suppress_str += ",Billing_address2"; } if ( document.form1.Billing_city.checked ) { information_str += ",Billing_city"; //suppress_str += ",Billing_city"; } if ( document.form1.Billing_state.checked ) { information_str += ",Billing_state"; //suppress_str += ",Billing_state"; } if ( document.form1.Billing_zip.checked ) { information_str += ",Billing_zip"; //suppress_str += ",Billing_zip"; } if ( document.form1.Billing_country.checked ) { information_str += ",Billing_country"; //suppress_str += ",Billing_country"; } // --------- Delivery_information fields ------- if ( document.form1.Delivery_name.checked ) { information_str += ",Delivery_name"; } if ( document.form1.Delivery_address1.checked ) { information_str += ",Delivery_address1"; //suppress_str += ",Delivery_address1"; } if ( document.form1.Delivery_address2.checked ) { information_str += ",Delivery_address2"; //suppress_str += ",Delivery_address2"; } if ( document.form1.Delivery_city.checked ) { information_str += ",Delivery_city"; //suppress_str += ",Delivery_city"; } if ( document.form1.Delivery_state.checked ) { information_str += ",Delivery_state"; //suppress_str += ",Delivery_state"; } if ( document.form1.Delivery_zip.checked ) { information_str += ",Delivery_zip"; //suppress_str += ",Delivery_zip"; } if ( document.form1.Delivery_country.checked ) { information_str += ",Delivery_country"; //suppress_str += ",Delivery_country"; } // --------- contact information fields ------- if ( document.form1.Contact_email.checked ) { information_str += ",Contact_email"; } if ( document.form1.Contact_phone.checked ) { information_str += ",Contact_phone"; } if ( document.form1.Contact_fax.checked ) { information_str += ",Contact_fax"; } // ---- currency field ---------------------------------------------------------------------------- // result_str += tab_str + "" + newline + newline ; // selected_currency = "$"; // } // else if ( document.form1.currency[1].checked ) // { // result_str += "£" + ">" + newline + newline ; // selected_currency = "£"; // } // else if ( document.form1.currency[2].checked ) // { // result_str += "¥" + ">" + newline + newline ; // selected_currency = "¥"; // } // else if ( document.form1.currency[3].checked ) // { // result_str += "Fr" + ">" + newline + newline ; // selected_currency = "Fr"; // } // else if ( document.form1.currency[4].checked ) // { // result_str += "DM" + ">" + newline + newline ; // selected_currency = "DM"; // } // else if ( document.form1.currency[5].checked ) // { // result_str += "Euro" + ">" + newline + newline ; // selected_currency = "Euro"; // } // // hidden_str += "currency,"; result_str += newline + "" + newline; result_str += "" + newline + newline; // ---- Form header information fields ------------------------------------------------------------------ result_str += "My Company Order form" + newline + newline ; // ---- Billing_information fields ---------------------------------------------------------------- result_str += "Billing Information:" + newline; result_str += "" + newline; if ( document.form1.Billing_name.checked ) result_str += table_TDstart_str + "Name: " + table_TDend_str; if ( document.form1.Billing_address1.checked ) result_str += table_TDstart_str + "Address Line 1: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Billing_address2.checked ) result_str += table_TDstart_str + "Address Line 2: " + newline + tab_str + tab_str + " " + table_TDend_str; if ( document.form1.Billing_city.checked ) result_str += table_TDstart_str + "City: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Billing_state.checked ) result_str += table_TDstart_str + "State: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Billing_zip.checked ) result_str += table_TDstart_str + "Zip / Postal Code: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Billing_country.checked ) result_str += table_TDstart_str + "Country: " + newline + tab_str + tab_str + "" + table_TDend_str; result_str += "" + newline + "" + newline + newline; // ---- Delivery_information fields --------------------------------------------------------------- result_str += "Delivery Information:" + newline; result_str += "" + newline; if ( document.form1.Delivery_name.checked ) result_str += table_TDstart_str + "Name: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Delivery_address1.checked ) result_str += table_TDstart_str + "Address Line 1: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Delivery_address2.checked ) result_str += table_TDstart_str + "Address Line 2: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Delivery_city.checked ) result_str += table_TDstart_str + "City: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Delivery_state.checked ) result_str += table_TDstart_str + "State: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Delivery_zip.checked ) result_str += table_TDstart_str + "Zip / Postal Code: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Delivery_country.checked ) result_str += table_TDstart_str + "Country: " + newline + tab_str + tab_str + "" + table_TDend_str; result_str += "" + newline + "" + newline + newline; // ---- contact information fields ------------------------------------------------------------------ if ( !document.form1.Contact_email.checked ) { alert("Contact Email address must be entered.."); return; } result_str += "Other Contact Information:" + newline; result_str += "" + newline; if ( document.form1.Contact_email.checked ) result_str += table_TDstart_str + "Email Address: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Contact_phone.checked ) result_str += table_TDstart_str + "Phone Number: " + newline + tab_str + tab_str + "" + table_TDend_str; if ( document.form1.Contact_fax.checked ) result_str += table_TDstart_str + "Fax Number: " + newline + tab_str + tab_str + "" + table_TDend_str; result_str += "" + newline + "" + newline + newline; // ---- other information fields ------------------------------------------------------------------ // to be implemented // ---- product line field ------------------------------------------------------------------------ result_str += "" + newline; // ---- Headings for the product table ------------------------------------------------------------ result_str += table_TDstart_str + "Product NameUnit PriceQuantitySub-Total" + table_TDend_str ; // ---- Product items for the product table ------------------------------------------------------- for ( index = 1 ; index <= document.form1.number_of_items.value ; index++ ) { // part 1 - the original fields, one per product/item result_str += table_TDstart_str + "Product " + index + ""; // part 2 - the price per unit // result_str += newline + tab_str + tab_str + "" + selected_currency + "1.55"; result_str += newline + tab_str + tab_str + "1.55"; hidden_str += "Product_" + index + "_value,"; // part 3 - the quantity field. Javascript here will update the subtotal field if the customer amends the qty. result_str += newline + tab_str + tab_str + "012345"; hidden_str += "Product_" + index + "_qty,"; // part 4 - the sub-total field at the end of the line. // result_str += newline + tab_str + tab_str + "" + selected_currency + ""; result_str += newline + tab_str + tab_str + ""; hidden_str += "Product_" + index + "_subtotal,"; // part 5 - the actual field that gets sent to DirectOne, which is in the format 'fieldname=(quantity,value)' where field name is the value that will appear on the invoice. // for example, if the field was SurfBoard1=(1,155) then the invoice would say something along the lines of -> SurfBoard1 1 $155 result_str += newline + tab_str + tab_str + "" + table_TDend_str; } // here we have a field for the total sum for the whole order form result_str += tab_str + "" + newline + tab_str + tab_str + "Order Total"; // result_str += "" + selected_currency + "" + table_TDend_str; result_str += "" + table_TDend_str; hidden_str += "OrderTotal"; result_str += newline + "" + newline; result_str += "" + newline; // ---- shipping information fields --------------------------------------------------------------- // not implemented in version 1 // ---- write the information field -------------------------------------------------------------- result_str += tab_str + "" + newline + newline; // ---- write the suppressed fields field -------------------------------------------------------- result_str += tab_str + "" + newline + newline; // ---- write the hidden fields field ------------------------------------------------------------ result_str += tab_str + "" + newline + newline; // ---- write the suppress zero quantity field --------------------------------------------------- result_str += tab_str + "" + newline; // ---- standard buttons -------------------------------------------------------------------------- result_str += newline + tab_str + " "; result_str += newline + tab_str + "Your credit card payment will be processed securly by DirectOne Payment Solutions."; result_str += newline + tab_str + "Please click the DirectOne logo below to find out more about payment security."; result_str += newline + tab_str + ""; result_str += newline + "" + newline + newline + ""+ newline + "
Billing Information:" + newline; result_str += "
" + newline + newline; // ---- Delivery_information fields --------------------------------------------------------------- result_str += "
Delivery Information:" + newline; result_str += "
" + newline + newline; // ---- contact information fields ------------------------------------------------------------------ if ( !document.form1.Contact_email.checked ) { alert("Contact Email address must be entered.."); return; } result_str += "
Other Contact Information:" + newline; result_str += "
" + newline + newline; // ---- other information fields ------------------------------------------------------------------ // to be implemented // ---- product line field ------------------------------------------------------------------------ result_str += "
" + newline; // ---- shipping information fields --------------------------------------------------------------- // not implemented in version 1 // ---- write the information field -------------------------------------------------------------- result_str += tab_str + "" + newline + newline; // ---- write the suppressed fields field -------------------------------------------------------- result_str += tab_str + "" + newline + newline; // ---- write the hidden fields field ------------------------------------------------------------ result_str += tab_str + "" + newline + newline; // ---- write the suppress zero quantity field --------------------------------------------------- result_str += tab_str + "" + newline; // ---- standard buttons -------------------------------------------------------------------------- result_str += newline + tab_str + " "; result_str += newline + tab_str + "
Your credit card payment will be processed securly by DirectOne Payment Solutions."; result_str += newline + tab_str + "Please click the DirectOne logo below to find out more about payment security."; result_str += newline + tab_str + ""; result_str += newline + "