%@Language=JScript%> <%Response.Buffer="True"%> <% var formData = new formValidationObject(); if (Request.Form("btnsubmit") == "Submit") formData.getData(); function formValidationObject() { this.str = new Array(); this.elem = new Array(); this.isValidEntry = new Array(); this.hasInvalidEntry = false; this.getData = getData; this.validate = validate; this.flagInvalidEntries = flagInvalidEntries; this.processOrMarkInvalidEntries = processOrMarkInvalidEntries; this.processData = processData; } function getData() { var formItems = new Enumerator(Request.Form); var i = 0; while (!formItems.atEnd()) { var elem = formItems.item(); this.str[elem] = Request.Form(elem); this.elem[i] = elem; // assume data is valid: this.isValidEntry[i] = true; i++; formItems.moveNext(); } this.validate(); this.processOrMarkInvalidEntries(); } function validate() { // validation regular expression for characters // that shouldn't appear in a person's name: //var reJunkChars = /\;|\[|\]|\:|\,|\^|\?|\{|\}|\\|\!|\@|\#|\$|\%|\&|\*|\(|\)|\+|\-$/; // to check if a string contains a number: //var reNums = /\d/; for (var i = 0; i < this.elem.length; i++) { switch (this.elem[i]) { case "Name": case "Email": case "Telephone": case "Fax": case "Company": case "OrderNumber": if (this.str[this.elem[i]] == "") { this.isValidEntry[i] = false; this.hasInvalidEntry = true; break; } //' no default case, so that fields not required don't need to be filled out } } } function processOrMarkInvalidEntries() { if (this.hasInvalidEntry) this.flagInvalidEntries(); else this.processData(); } function flagInvalidEntries() { Response.Write("\n"); } function processData() { var Message = ""; //' Construct email body for (var i = 0; i < this.elem.length; i++) Message = Message + this.elem[i] + ": " + this.str[this.elem[i]] + "\n"; email_sender = Request.Form("email"); email_name = Request.Form("Name"); email_subject = "Universal Metal Hose Ordering"; email_importance = 1; var Mailer = Server.CreateObject("SMTPsvg.Mailer"); Mailer.FromName = email_name; Mailer.FromAddress = email_sender; //Mailer.RemoteHost = "ns1.pint.com"; Mailer.RemoteHost = "smtp.myrient.net"; Mailer.AddRecipient ("Sales", "sales@universalmetalhose.com"); //Mailer.AddRecipient ("Jimmy Tam", "jtam@pint.com"); Mailer.Subject = email_subject; Mailer.BodyText = Message; if (Mailer.SendMail()) { Response.Write("Mail successfully sent") } else { Response.Write("Mail failure. Check mail host server name and tcp/ip connection...\n"); Response.Write(Mailer.Response); } Response.Redirect("thankyou.htm"); } %>
![]() |
![]() |
Ordering Universal Metal Hose products are available from Sales Representatives and Distributors, or they can be purchased direct from the factory. The minimum factory order for open account customers, COD shipments, or bank card sales is $50.00 (USD). All major credit or debit cards are accepted. The minimum order for new account applicants is $500.00. Our confidential Credit Application can be downloaded and forwarded to Universal for processing. All orders are subject to the following Terms and Conditions, and the following warranty applies to all material. Please read these documents.
Universal Metal Hose 2133 South Kedzie Ave. Chicago, IL 60623-3393 Voice: (773) 277-0700 Fax: (773) 277- 0727 1-800-MET-HOSE (638-4673) sales@universalmetalhose.com <% if (Request.Form("btnsubmit") == " Submit ") Response.Write("\n Please enter or correct data in the fields marked with bold red text. Fields marked with an * are required. \n"); %>[ back to top ] |
|
Home | About Universal | Products | Product Selection | Ordering | Glossary | Contact Us Terms and Conditions | Limited Warranty Copyright © Hyspan Precision Products, Inc. 2002. All rights reserved. |