Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 418
  • Last Modified:

JQuery API Implementation

Hi Experts,

I am trying to implement an address verification into my website.  The following works until I try to include a MasterPage then it appears to post but I get no results or error.  What am I doing wrong, I'm sure it is a silly mistake.  Thanks

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="street-address.aspx.vb" MasterPageFile="/StaffSettings/StaffSite.Master" Inherits="ProVal.street_address" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

		<!-- jQuery -->
		<script type="text/javascript" src="https://api.qualifiedaddress.com/scripts/all-min.js"></script>

		<!-- jQuery UI -->
		<script type="text/javascript" src="https://api.qualifiedaddress.com/scripts/library.js"></script>

		<!-- jQuery Templates -->
		<script type="text/javascript" src="https://api.qualifiedaddress.com/scripts/qad.js"></script>
        <script language="javascript" type="text/javascript">
            QadApi
                (
                 {
                     timeout: 10,
                     key: 32497822,
                     busySubmit: false,
                     submitId: "btnVerify",
                     onComplete: function () { return false; }
                 },
                 {
                     busyId: "QadBusy",
                     busyText: "Validating address...",
                     animate: "slow"
                 },
                 [
                  {
                      name: "Billing Address",
                      street: "street",
                      street2: "street2",
                      unit: "id",
                      city: "city",
                      state: "state",
                      zip: "zip"
                  }
                 ]
                );
        </script>
        <script type="text/javascript">
            var url = 'https://api.qualifiedaddress.com/street-address/?street=1600+Amphitheatre+Parkway&city=Mountain+View&state=CA&zipcode=94043&candidates=5&auth-token=32497822';

            $.getJSON(url, function (data) {
                if (data.length > 0)
                    $('#shippingstreet').val(data[0].delivery_line1);
            });
        </script>
		    <!-- jQuery UI stylesheet -->
		    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/redmond/jquery-ui.css" type="text/css" media="all" />
		    <style type="text/css">
			    .address-result {
				    cursor: pointer;
				    margin-bottom: 10px;
				    padding: 5px;
			    }
			    .address-result:hover {
				    background-color: gray;
			    }
			    .complete-address {
				    display: none;
			    }
			    .title {
				    color: gray;
				    font-size: smaller;
				    margin-bottom: 12px;
			    }
		    </style>
            </asp:Content>
	    <asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server" >
			    <div>
				    <label for="street">Street</label>
                    <asp:TextBox ID="street" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="street2">Street 2</label>
                    <asp:TextBox ID="street2" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="city">City</label>
                    <asp:TextBox ID="city" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="state">State</label>
                    <asp:TextBox ID="state" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="zip">ZIP Code</label>
                    <asp:TextBox ID="zip" runat="server"></asp:TextBox>
			    </div>
            <asp:Button ID="btnVerify" runat="server" Text="Verify" CausesValidation="False"/>

			    <%--<button id="verify" onclick="return verify_onclick()">Verify</button>--%>
		 

		    <div id="dialog" style="display:none;">
			    <div id="candidates"></div>
		    </div>

		    <div id="results" style="display:none;"></div>

		    <script type="text/x-jquery-tmpl" id="address-candidate-template">
			    {{if user_input}}
			    <span class="title">You provided:</span><br />
			    {{else candidate_index === 0}}
			    <span class="title">We suggest:</span><br />
			    {{/if}}
			    <div class="address-result">
				    <span>${delivery_line_1}</span><br />
				    <span>${last_line}</span>
				    <span class="complete-address">${ JSON.stringify($item.data) }</span>
			    </div>
		    </script>
</asp:Content>
	

Open in new window



<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="StaffSite.master.vb" Inherits="ProVal.StaffSite1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
     <link href="../Styles/Site.css" rel="stylesheet" type="text/css" />   
    <title></title>
     
   <asp:ContentPlaceHolder ID="HeadContent" runat="server"> 
   </asp:ContentPlaceHolder>
    <style type="text/css">
        .style2
        {
            text-align: center;
        }
    </style>
    </head>
<body>
<form id="myform" runat="server">
<div id="wrap">
    <div id="header">
    <div class="logo">
   <h1>
       <img src="../Images/Logo.png" 
           alt="Transcontinental Valuations - Powered by ProVal" />
      <asp:Label ID="lblLogo" runat="server" Text="Transcontinental Valuations&#8482"></asp:Label>
      <br />
     <small class="slogan"><asp:Label ID="lblSmLogo" runat="server" Text="Powered by ProVal"></asp:Label>
      </small></h1> 
  </div>
  <div id="login">
           <asp:LoginView ID="LoginView1" runat="server">
        <AnonymousTemplate>
            You are not logged in.  Click the Login link to sign in.
                    <br />
                    </AnonymousTemplate>
        <LoggedInTemplate>
            Welcome,<asp:LoginName ID="LoginName1" runat="server" />
            <br />
            <asp:HyperLink ID="HyperLink1" runat="server"
                NavigateUrl="~/Users/ChangePassword.aspx" Font-Underline="True">Change Password</asp:HyperLink>
            <br />
        </LoggedInTemplate>
        </asp:LoginView>
        <asp:LoginStatus ID="LoginStatus2" runat="server" LogoutPageUrl="~/Default.aspx" 
                            ForeColor="#00009C" Font-Underline="True"  />
                
            <br />
                
            <asp:HyperLink ID="HyperLink4" runat="server" 
                NavigateUrl="../Users/RecoverPassword.aspx"  Font-Underline="True" 
                            ForeColor="#00009C">Forgot your password?</asp:HyperLink>
    </div>
    </div>
    
    <div class="clr"></div>
    <div id="nav">
    <ul>
    <li><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="All.aspx">Open Orders</asp:HyperLink></li>
     <li><asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="Settings.aspx">Company Settings</asp:HyperLink></li>
     <li><asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="Accounting.aspx">Accounting</asp:HyperLink></li>
     <li><asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="Order_StaffManual.aspx">Order Entry</asp:HyperLink></li>
     </ul>
    <div id="sidebar">
           <asp:ContentPlaceHolder ID="LeftContent" runat="server">
           
           </asp:ContentPlaceHolder>
           
                   
</div>
    <div id="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
        
        </asp:ContentPlaceHolder>
        </div> 
        <div id="footer" class="style2">
      Copyright © 2012 
<br />Powered by ProVal
      </div>  
      </div>
      </div>
    </form>
</body>
</html>

Open in new window

0
rcowen00
Asked:
rcowen00
  • 5
  • 3
  • 2
4 Solutions
 
rcowen00Author Commented:
Hi Experts,

After some further research, the API is connecting and triggering the address verification, but the div that handles the results is not opening/viewable.  Any suggestions?
0
 
CodeCruiserCommented:
Where are you populating and showing the result div? Can you show that bit of code?
0
 
rcowen00Author Commented:
Lines 39 to 52

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="street-address.aspx.vb" MasterPageFile="/StaffSettings/StaffSite.Master" Inherits="ProVal.street_address" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

		
            </asp:Content>
	    <asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server" >
			    <div>
				    <label for="street">Street</label>
                    <asp:TextBox ID="street" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="street2">Street 2</label>
                    <asp:TextBox ID="street2" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="city">City</label>
                    <asp:TextBox ID="city" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="state">State</label>
                    <asp:TextBox ID="state" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="zip">ZIP Code</label>
                    <asp:TextBox ID="zip" runat="server"></asp:TextBox>
			    </div>
            <asp:Button ID="btnVerify" runat="server" Text="Verify" CausesValidation="False"/>

			    <%--<button id="verify" onclick="return verify_onclick()">Verify</button>--%>
		 
          <div id="dialog" style="display:none;">
			    <div id="candidates"></div>
		    </div>

		    <div id="results" style="display:none;"></div>

		    <script type="text/x-jquery-tmpl" id="address-candidate-template">
			    {{if user_input}}
			    <span class="title">You provided:</span><br />
			    {{else candidate_index === 0}}
			    <span class="title">We suggest:</span><br />
			    {{/if}}
			    <div class="address-result">
				    <span>${delivery_line_1}</span><br />
				    <span>${last_line}</span>
				    <span class="complete-address">${ JSON.stringify($item.data) }</span>
			    </div>
		    </script>
		    
</asp:Content>

Open in new window

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
CodeCruiserCommented:
And where do you call the jQuery tmpl method?

http://api.jquery.com/tmpl/
0
 
SriVaddadiCommented:
<div id="results" style="display:none;"></div>

Your div tag has the style set to "display:none".  Even if you would have set the style different at run time it just reverts to display:none on post back...
0
 
SriVaddadiCommented:
remove the display: none style and try...
0
 
rcowen00Author Commented:
The code below works as expected with no call to the  jQuery tmpl method and the results div set to display none.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="streetaddress.aspx.vb" Inherits="ProVal.streetaddress" %>
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <!-- jQuery -->
		<script type="text/javascript" src="https://api.qualifiedaddress.com/scripts/all-min.js"></script>

		<!-- jQuery UI -->
		<script type="text/javascript" src="https://api.qualifiedaddress.com/scripts/library.js"></script>

		<!-- jQuery Templates -->
		<script type="text/javascript" src="https://api.qualifiedaddress.com/scripts/qad.js"></script>
        <script language="javascript" type="text/javascript">
            QadApi
                (
                 {
                     timeout: 10,
                     key: xxxxxxxx,
                     busySubmit: false,
                     submitId: "btnVerify",
                     onComplete: function () { return false; }
                 },
                 {
                     busyId: "QadBusy",
                     busyText: "Validating address...",
                     animate: "slow"
                 },
                 [
                  {
                      name: "Billing Address",
                      street: "street",
                      street2: "street2",
                      unit: "id",
                      city: "city",
                      state: "state",
                      zip: "zip"
                  }
                 ]
                );
        </script>
        <script type="text/javascript">
            var url = 'https://api.qualifiedaddress.com/street-address/?street=1600+Amphitheatre+Parkway&city=Mountain+View&state=CA&zipcode=94043&candidates=5&auth-token=32497822';

            $.getJSON(url, function (data) {
                if (data.length > 0)
                    $('#shippingstreet').val(data[0].delivery_line1);
            });
        </script>
		    <!-- jQuery UI stylesheet -->
		    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/redmond/jquery-ui.css" type="text/css" media="all" />
		    <style type="text/css">
			    .address-result {
				    cursor: pointer;
				    margin-bottom: 10px;
				    padding: 5px;
			    }
			    .address-result:hover {
				    background-color: gray;
			    }
			    .complete-address {
				    display: none;
			    }
			    .title {
				    color: gray;
				    font-size: smaller;
				    margin-bottom: 12px;
			    }
		    </style>
</head>
<body>
    <form id="form1" runat="server">
    
    
     <div>
				    <label for="street">Street</label>
                    <asp:TextBox ID="street" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="street2">Street 2</label>
                    <asp:TextBox ID="street2" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="city">City</label>
                    <asp:TextBox ID="city" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="state">State</label>
                    <asp:TextBox ID="state" runat="server"></asp:TextBox>
			    </div>

			    <div>
				    <label for="zip">ZIP Code</label>
                    <asp:TextBox ID="zip" runat="server"></asp:TextBox>
			    </div>
            <asp:Button ID="btnVerify" runat="server" Text="Verify"/>

			    <%--<button id="verify" onclick="return verify_onclick()">Verify</button>--%>
		    </form>

		    <div id="dialog" style="display:none;">
			    <div id="candidates"></div>
		    </div>

		    <div id="results" style="display:none;"></div>

		    <script type="text/x-jquery-tmpl" id="address-candidate-template">
			    {{if user_input}}
			    <span class="title">You provided:</span><br />
			    {{else candidate_index === 0}}
			    <span class="title">We suggest:</span><br />
			    {{/if}}
			    <div class="address-result">
				    <span>${delivery_line_1}</span><br />
				    <span>${last_line}</span>
				    <span class="complete-address">${ JSON.stringify($item.data) }</span>
			    </div>
		    </script>
</body>
</html>

Open in new window

0
 
SriVaddadiCommented:
I thought you said results are not Viewable
0
 
rcowen00Author Commented:
In my original post, I stated that the function works great until I try to include a master page, then I get no results.  My last post was just to illustrate that it does works with display set to none and no call the the jQuery tmpl method.
0
 
rcowen00Author Commented:
I ended up doing the following and taking the master page out of the equation.  The following is working correctly.  Thanks for your assistance.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Order_StaffManual.aspx.vb" Inherits="ProVal.streetaddress" %>
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="../Styles/Site.css" rel="stylesheet" type="text/css" /> 
    <title></title>
    <!-- jQuery -->
		<script type="text/javascript" src="https://api.qualifiedaddress.com/scripts/all-min.js"></script>

		<!-- jQuery UI -->
		<script type="text/javascript" src="https://api.qualifiedaddress.com/scripts/library.js"></script>

		<!-- jQuery Templates -->
		<script type="text/javascript" src="https://api.qualifiedaddress.com/scripts/qad.js"></script>
        <script language="javascript" type="text/javascript">
            QadApi
                (
                 {
                     timeout: 10,
                     key: 32497822,
                     busySubmit: false,
                     submitId: "btnVerify",
                     onComplete: function () { return false; }
                 },
                 {
                     busyId: "QadBusy",
                     busyText: "Validating address...",
                     animate: "slow"
                 },
                 [
                  {
                      name: "Billing Address",
                      street: "txtAddress",
                      street2: "stxtAddress2",
                      unit: "id",
                      city: "txtCity",
                      state: "StateID",
                      zipcode: "txtZip",
                      plus4_code:  "txtZipSuffix",
                      county: "txtCounty",
                      latitude: "txtLat",
                      longitude: "txtLong"
                      
                  }
                 ]
                );
        </script>
        <script type="text/javascript">
            var url = 'https://api.qualifiedaddress.com/street-address/?street=1600+Amphitheatre+Parkway&city=Mountain+View&state=CA&zipcode=94043&candidates=5&auth-token=xxxxxx';

            $.getJSON(url, function (data) {
                if (data.length > 0)
                    $('#shippingstreet').val(data[0].delivery_line1);
            });
        </script>
		    <!-- jQuery UI stylesheet -->
		    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/redmond/jquery-ui.css" type="text/css" media="all" />
		    <style type="text/css">
			    .address-result {
				    cursor: pointer;
				    margin-bottom: 10px;
				    padding: 5px;
			    }
			    .address-result:hover {
				    background-color: gray;
			    }
			    .complete-address {
				    display: none;
			    }
			    .title {
				    color: gray;
				    font-size: smaller;
				    margin-bottom: 12px;
			    }
		    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="wrap">
    <div id="header">
    <div class="logo">
   <h1>
       <img src="../Images/Logo.png" 
           alt="Transcontinental Valuations - Powered by ProVal" />
      <asp:Label ID="lblLogo" runat="server" Text="Transcontinental Valuations&#8482"></asp:Label>
      <br />
     <small class="slogan"><asp:Label ID="lblSmLogo" runat="server" Text="Powered by ProVal"></asp:Label>
      </small></h1> 
  </div>
  <div id="login">
           <asp:LoginView ID="LoginView1" runat="server">
        <AnonymousTemplate>
            You are not logged in.  Click the Login link to sign in.
                    <br />
                    </AnonymousTemplate>
        <LoggedInTemplate>
            Welcome,<asp:LoginName ID="LoginName1" runat="server" />
            <br />
            <asp:HyperLink ID="HyperLink1" runat="server"
                NavigateUrl="~/Users/ChangePassword.aspx" Font-Underline="True">Change Password</asp:HyperLink>
            <br />
        </LoggedInTemplate>
        </asp:LoginView>
        <asp:LoginStatus ID="LoginStatus2" runat="server" LogoutPageUrl="~/Default.aspx" 
                            ForeColor="#00009C" Font-Underline="True"  />
                
            <br />
                
            <asp:HyperLink ID="HyperLink4" runat="server" 
                NavigateUrl="../Users/RecoverPassword.aspx"  Font-Underline="True" 
                            ForeColor="#00009C">Forgot your password?</asp:HyperLink>
    </div>
    </div>
    
    <div class="clr"></div>
    <div id="nav">
    <ul>
    <li><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="All.aspx">Open Orders</asp:HyperLink></li>
     <li><asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="Settings.aspx">Company Settings</asp:HyperLink></li>
     <li><asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="Accounting.aspx">Accounting</asp:HyperLink></li>
     <li><asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="Order_StaffManual.aspx">Order Entry</asp:HyperLink></li>
     </ul>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
        CssClass="ValidationError" DisplayMode="List" Width="906px" />
    <asp:Panel ID="pnlBulkOption" runat="server" Height="37px" 
        Width="899px">
        <asp:Button ID="ButtonUpload" runat="server" Text="Upload Excel Spreadsheet" CausesValidation="False" />
            <asp:Label ID="lblSuccessfullyImport" runat="server" Font-Bold="True" Font-Size="Medium" Text="Order successfully imported"></asp:Label>
            </asp:Panel>
    
     <div>
     <asp:Panel ID="pnlManualOrder" runat="server" Visible="true" TabIndex="1" 
        Width="1123px">
   <h3>Order Details</h3>
    <table frame="void">
     <tr>
           <td><asp:Label ID="Label36" runat="server" Text="Loan #:*"></asp:Label></td>
           <td><asp:TextBox ID="txtLoanNumber" runat="server" TabIndex="1"></asp:TextBox></td>
           <td><asp:Label ID="Label4" runat="server" Text="Client Ref #:"></asp:Label></td>
           <td><asp:TextBox ID="txtClientRefNum" runat="server" TabIndex="2"></asp:TextBox></td>
           <td><asp:Label ID="Label5" runat="server" Text="Case #:"></asp:Label></td>
           <td><asp:TextBox ID="txtCaseNumber" runat="server" TabIndex="3"></asp:TextBox></td>
           <td><asp:Label ID="Label6" runat="server" Text="Legal Desc :"></asp:Label></td>
           <td><asp:TextBox ID="txtLegalDesc" runat="server"  TabIndex="4"></asp:TextBox></td>
    </tr>
    <tr>
    <td><asp:Label ID="Label8" runat="server" Text="Location Type"></asp:Label>:</td>
    <td><asp:DropDownList ID="txtLocType" runat="server" AppendDataBoundItems="true" 
                    DataSourceID="LocationType" DataTextField="LocationTypeName" 
                    DataValueField="LocationTypeKey" TabIndex="5" CssClass="dropdown" >
                    <asp:ListItem Value="0"> (Select a Location)</asp:ListItem>
                    </asp:DropDownList></td>
    <td>
        <asp:Label ID="Label7" runat="server" Text="Property Type: *"></asp:Label>
        </td>
    <td>
        <asp:DropDownList ID="txtPropertyType" runat="server" 
            AppendDataBoundItems="True" CssClass="dropdown" DataSourceID="PropertyType" 
            DataTextField="PropertyTypeName" DataValueField="PropertyTypeKey" 
            TabIndex="6">
            <asp:ListItem Value="0">(Select a Property Type)</asp:ListItem>
        </asp:DropDownList>
        </td>
    <td>
        <asp:Label ID="Label17" runat="server" Text="Intended Use:"></asp:Label>
        </td>
    <td>
        <asp:DropDownList ID="IntendedUseID" runat="server" AppendDataBoundItems="True" 
            CssClass="dropdown" DataSourceID="IntendedUse" DataTextField="IntendedUseName" 
            DataValueField="IntendedUseKey" TabIndex="7">
            <asp:ListItem Selected="True" Value="0"> (Select intended Use)</asp:ListItem>
        </asp:DropDownList>
        </td>
    <td>
        <asp:Label ID="Label35" runat="server" Text="Occupancy:"></asp:Label>
        </td>
    <td>
        <asp:DropDownList ID="OccupancyID" runat="server" AppendDataBoundItems="True" 
            CssClass="dropdown" DataSourceID="Occupancy" DataTextField="OccupancyTypeName" 
            DataValueField="OccupancyTypeKey" TabIndex="8">
            <asp:ListItem Selected="True" Value="0"> (Select occupancy)</asp:ListItem>
        </asp:DropDownList>
        </td>
    </tr>
    <tr>
    <td>
        <asp:Label ID="Label33" runat="server" Text="Loan Amount:"></asp:Label>
        </td>
    <td>
        <asp:TextBox ID="intLoanAmount" runat="server" TabIndex="9"></asp:TextBox>
        
        </td>
    <td>
        <asp:Label ID="Label34" runat="server" Text="Loan Type:"></asp:Label>
        </td>
    <td>
        <asp:DropDownList ID="LoanTypeID" runat="server" AppendDataBoundItems="True" 
            CssClass="dropdown" DataSourceID="LoanType" DataTextField="LoanTypeName" 
            DataValueField="LoanTypeKey" TabIndex="10">
            <asp:ListItem Selected="True" Value="0"> (Select loan type)</asp:ListItem>
        </asp:DropDownList>
        </td>
    </tr>
        <tr>
            <td>
                <asp:Label ID="Label9" runat="server" Text="Address: *"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtAddress" runat="server" TabIndex="11"></asp:TextBox>
            </td>
            <td>
                <asp:Label ID="Label10" runat="server" Text="Address 2:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtAddress2" runat="server" TabIndex="12"></asp:TextBox>
            </td>
            <td>
                <asp:Label ID="Label11" runat="server" Text="City:*"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtCity" runat="server" TabIndex="13"></asp:TextBox>
            </td>
            <td>
                <asp:Label ID="Label12" runat="server" Text="State:*"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="StateID" runat="server" AppendDataBoundItems="True" 
                    CausesValidation="True" CssClass="dropdown" DataSourceID="SqlDataSource1" 
                    DataTextField="StateName" DataValueField="StateAbbr" TabIndex="14">
                    <asp:ListItem Selected="True" Value="0"> (Select a State)</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label14" runat="server" Text="Zip: *"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtZip" runat="server" AutoPostBack="True" TabIndex="15"></asp:TextBox>
            </td>
            <td>
                <asp:Label ID="Label13" runat="server" Text="County:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtCounty" runat="server" TabIndex="16"></asp:TextBox>
            </td>
            <td colspan="2">
             <asp:Button ID="Button1" runat="server" Text="Verify Address" CausesValidation="False" />
            </td>
        </tr>
    <tr>
        <td>
            <asp:Label ID="Label41" runat="server" Text="Rush Type: *"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="ddRushType" runat="server" AppendDataBoundItems="True" 
                CssClass="dropdown" DataSourceID="RushTypeList" DataTextField="RushType" 
                DataValueField="RushTypeKey" TabIndex="17">
                <asp:ListItem Selected="True" Value="3">None</asp:ListItem>
            </asp:DropDownList>
        </td>
    <td>
        <asp:Label ID="Label16" runat="server" Text="Client:*"></asp:Label>
        </td>
    <td>
        <asp:DropDownList ID="ClientID" runat="server" AppendDataBoundItems="True" 
            CssClass="dropdown" DataSourceID="Client" DataTextField="ClientName" 
            DataValueField="ClientKey" TabIndex="18">
            <asp:ListItem Selected="True" Value="0"> (Select client)</asp:ListItem>
        </asp:DropDownList>
        </td>
    <td>
        <asp:Label ID="Label15" runat="server" Text="Report Type:*"></asp:Label>
        </td>
    <td>
        <asp:DropDownList ID="ReportTypeID" runat="server" AppendDataBoundItems="True" 
            CssClass="dropdown" DataSourceID="ReportType" DataTextField="ReportTypeName" 
            DataValueField="ReportTypeKey" TabIndex="19" AutoPostBack="True">
            <asp:ListItem Selected="True" Value="0"> (Select a Report)</asp:ListItem>
        </asp:DropDownList>
        </td>
    </tr>
        <tr>
            <td>
                Client Due Date:</td>
            <td>
                <asp:TextBox ID="txtClientDueDate" runat="server" TabIndex="20"></asp:TextBox>
            </td>
            <td>
                Client Fee:&nbsp;
            </td>
            <td>
                <asp:TextBox ID="txtClientFee" runat="server" TabIndex="21"></asp:TextBox>
            </td>
        </tr>
    </table>
    <h3>Borrower Details</h3>
    <table>
    <tr>
    <td><asp:Label ID="Label19" runat="server" Text="First Name"></asp:Label></td>
    <td><asp:TextBox ID="txtBorrFirst" runat="server" TabIndex="22"></asp:TextBox></td>
    <td><asp:Label ID="Label20" runat="server" Text="Last Name :"></asp:Label></td>
    <td><asp:TextBox ID="txtBorrLast" runat="server"  TabIndex="23"></asp:TextBox></td>
    <td><asp:Label ID="Label21" runat="server" Text="Home Phone:"></asp:Label></td>
    <td><asp:TextBox ID="txtBorrHomeArea" runat="server"   TabIndex="24" Height="26px" 
            Width="30px" MaxLength="3"></asp:TextBox>&nbsp;<asp:TextBox 
            ID="txtBorrHomePrefix" runat="server" 
            Height="26px" TabIndex="25" Width="30px" MaxLength="3"></asp:TextBox>
        &nbsp;<asp:TextBox ID="txtBorrHomeSuffix" runat="server" Height="26px" TabIndex="26" 
            Width="40px" MaxLength="4"></asp:TextBox>
        </td>
    <td><asp:Label ID="Label22" runat="server" Text="Work Phone:"></asp:Label></td>
    <td>
        <asp:TextBox ID="txtBorrWorkArea" runat="server"   TabIndex="27" Height="26px" 
            Width="30px" MaxLength="3"></asp:TextBox>&nbsp;<asp:TextBox 
            ID="txtBorrWorkPrefix" runat="server" 
            Height="26px" TabIndex="28" Width="30px" MaxLength="3"></asp:TextBox>
        &nbsp;<asp:TextBox ID="txtBorrWorkSuffix" runat="server" Height="26px" TabIndex="29" 
            Width="40px" MaxLength="4"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="Label23" runat="server" Text="Cell Phone:"></asp:Label>
        </td>
        <td>
            <asp:TextBox ID="txtBorrCellArea" runat="server" Height="26px" MaxLength="3" 
                TabIndex="30" Width="30px"></asp:TextBox>
            &nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="txtBorrCellPrefix" runat="server" Height="26px" MaxLength="3" 
                TabIndex="31" Width="30px"></asp:TextBox>
            &nbsp;&nbsp;
            <asp:TextBox ID="txtBorrCellSuffix" runat="server" Height="26px" MaxLength="4" 
                TabIndex="32" Width="40px"></asp:TextBox>
        </td>
    <td><asp:Label ID="Label24" runat="server" Text="Email"></asp:Label></td>
    <td><asp:TextBox ID="txtBorrEmail" runat="server" TabIndex="33"></asp:TextBox></td>
    </tr>
    </table>
            
  <h3>Contact Details</h3>
    <table>
    <tr>
    <td><asp:Label ID="Label3" runat="server" Text="First Name"></asp:Label></td>
    <td><asp:TextBox ID="txtContFirst" runat="server" TabIndex="34"></asp:TextBox></td>
    <td class="style3"><asp:Label ID="Label18" runat="server" Text="Last Name :"></asp:Label></td>
    <td><asp:TextBox ID="txtContLast" runat="server"  TabIndex="35"></asp:TextBox></td>
    <td><asp:Label ID="Label37" runat="server" Text="Home Phone:"></asp:Label></td>
    <td><asp:TextBox ID="txtContHomeArea" runat="server"   TabIndex="36" Height="26px" 
            Width="30px" MaxLength="3"></asp:TextBox>&nbsp;<asp:TextBox 
            ID="txtContHomePrefix" runat="server" 
            Height="26px" TabIndex="37" Width="30px" MaxLength="3"></asp:TextBox>
        &nbsp;<asp:TextBox ID="txtContHomeSuffix" runat="server" Height="26px" TabIndex="38" 
            Width="40px" MaxLength="4"></asp:TextBox>
        </td>
    <td><asp:Label ID="Label25" runat="server" Text="Work Phone:"></asp:Label></td>
    <td>
        <asp:TextBox ID="txtContWorkArea" runat="server"   TabIndex="39" Height="26px" 
            Width="30px" MaxLength="3"></asp:TextBox>&nbsp;<asp:TextBox 
            ID="txtContWorkPrefix" runat="server" 
            Height="26px" TabIndex="40" Width="30px" MaxLength="3"></asp:TextBox>
        &nbsp;<asp:TextBox ID="txtContWorkSuffix" runat="server" Height="26px" TabIndex="41" 
            Width="40px" MaxLength="4"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="Label26" runat="server" Text="Cell Phone:"></asp:Label>
        </td>
        <td>
            <asp:TextBox ID="txtContCellArea" runat="server" Height="26px" MaxLength="3" 
                TabIndex="42" Width="30px"></asp:TextBox>
            &nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="txtContCellPrefix" runat="server" Height="26px" MaxLength="3" 
                TabIndex="43" Width="30px"></asp:TextBox>
            &nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="txtContCellSuffix" runat="server" Height="26px" MaxLength="4" 
                TabIndex="44" Width="40px"></asp:TextBox>
        </td>
    <td><asp:Label ID="Label40" runat="server" Text="Email"></asp:Label></td>
    <td><asp:TextBox ID="txtContEmail" runat="server" TabIndex="45"></asp:TextBox></td>
    <td class="style3"> <asp:Label ID="Label32" runat="server" Text="Relation"></asp:Label></td>
    <td><asp:DropDownList ID="ContRelationID" runat="server" AppendDataBoundItems="True" 
                                DataSourceID="Relation" DataTextField="RelationName" DataValueField="RelationKey" 
                                TabIndex="46"   CausesValidation="True" 
            CssClass="dropdown">
                                <asp:ListItem Selected="True" Value="0"> (Select relation)</asp:ListItem>
                            </asp:DropDownList></td>
    </tr>
    </table>
    </asp:Panel>
				  
		    <asp:Button ID="btnManualUpload" runat="server" Height="33px" 
        TabIndex="46" Text="Submit" Width="393px" />

		    <div id="dialog" style="display:none;">
			    <div id="candidates"></div>
		    </div>

		    <div id="results" style="display:none;"></div>

		    <script type="text/x-jquery-tmpl" id="address-candidate-template">
			    {{if user_input}}
			    <span class="title">You provided:</span><br />
			    {{else candidate_index === 0}}
			    <span class="title">We suggest:</span><br />
			    {{/if}}
			    <div class="address-result">
				    <span>${delivery_line_1}</span><br />
				    <span>${last_line}</span>
				    <span class="complete-address">${ JSON.stringify($item.data) }</span>
			    </div>
		    </script>
            <asp:Panel ID="pnlUpload" runat="server" Visible="false" Width="1019px">
                Please select an Excel file to import:<br /> <asp:FileUpload ID="FileUploadExcel" runat="server" style="margin-bottom: 0px" />
                <asp:Label ID="Label1" runat="server"></asp:Label><asp:Button ID="btnFileUpload" runat="server" Text="View Upload" />
                <asp:Button ID="btnWriteData" runat="server" Text="Write to File" />
                <br />
                <asp:Label ID="Label2" runat="server"></asp:Label></asp:Panel><asp:Panel ID="pnlImport" runat="server" Visible="false">
                </asp:Panel>
             <asp:SqlDataSource ID="LocationType" runat="server" 
                ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
                SelectCommand="SELECT DISTINCT [LocationTypeKey], [LocationTypeName] FROM [LocationType]">
            </asp:SqlDataSource>        
            <asp:SqlDataSource ID="ClientUsers" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
            SelectCommand="GetClientUsersByClientKey" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:FormParameter DefaultValue="" FormField="ClientID" Name="ClientKey" 
                        Type="Int32" />
                </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="RushTypeList" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
            SelectCommand="GetRushTypeList" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
                SelectCommand="SELECT [StateAbbr], [StateKey],[StateName] FROM [State] ORDER BY [StateAbbr]">
            </asp:SqlDataSource>
        <asp:SqlDataSource ID="PropertyType" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
            SelectCommand="SELECT DISTINCT PropertyTypeKey, PropertyTypeName FROM PropertyType WHERE (Deleted IS NULL) ORDER BY PropertyTypeName">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="ReportType" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
            SelectCommand="SELECT [ReportTypeKey], [ReportTypeName] FROM [ReportType]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="Client" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
            SelectCommand="GetClientList" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="IntendedUse" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
            SelectCommand="SELECT [IntendedUseKey], [IntendedUseName], [Deleted] FROM [IntendedUse] ORDER BY [IntendedUseName]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="Occupancy" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
            SelectCommand="SELECT [OccupancyTypeKey], [OccupancyTypeName], [Deleted] FROM [OccupancyType] WHERE ([Deleted] IS NULL) ORDER BY [OccupancyTypeName]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="LoanType" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
            SelectCommand="SELECT [LoanTypeKey], [LoanTypeName] FROM [LoanType] WHERE ([Deleted] IS NULL) ORDER BY [LoanTypeName]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="Relation" runat="server" 
            ConnectionString="<%$ ConnectionStrings:myprovalConnectionString %>" 
            SelectCommand="SELECT [RelationKey], [RelationName] FROM [Relation] WHERE ([Deleted] IS NULL) ORDER BY [RelationName]">
        </asp:SqlDataSource>
       
        
   
    <asp:CompareValidator ID="vldPropType" runat="server" ControlToValidate="txtPropertyType" 
                                ErrorMessage="Property type required" Font-Bold="True" 
            Operator="NotEqual" ValueToCompare="0" Type="Integer" 
        CssClass="validError" Display="None"></asp:CompareValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
        ErrorMessage="Loan # required, if none available please enter NA." 
        CssClass="validError" ControlToValidate="txtLoanNumber" Display="None"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="vldAddr" runat="server" 
                                ControlToValidate="txtAddress" ErrorMessage="Address is required" 
                                Font-Bold="True" Font-Size="XX-Small" 
        ForeColor="Red" Display="None"></asp:RequiredFieldValidator>
          
         <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                ControlToValidate="txtCity" 
        ErrorMessage="City is required" Font-Bold="True" 
                                Font-Size="XX-Small" ForeColor="Red" 
        Display="None"></asp:RequiredFieldValidator>
  
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
        ErrorMessage="Zip code required" ControlToValidate="txtZip" 
        CssClass="validError" Display="None"></asp:RequiredFieldValidator>
                      <asp:RegularExpressionValidator ID="vld3BorrHmArea" 
        runat="server" ControlToValidate="txtBorrHomeArea" Display="None" 
        ErrorMessage="3 digits required in the Borrower home phone area code" 
        ValidationExpression="^\d{3}$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3BorrHmPrefix" runat="server" 
        ControlToValidate="txtBorrHomePrefix" Display="None" 
        ErrorMessage="3 digits required in the borrower home phone prefix" 
        ValidationExpression="^\d{3}$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld4BorrHmSuffix" runat="server" 
        ControlToValidate="txtBorrHomeSuffix" Display="None" 
        ErrorMessage="4 digits required in the borrower home phone suffix" 
        ValidationExpression="^\d{4}$"></asp:RegularExpressionValidator>
                      <br />
                    <asp:RegularExpressionValidator ID="vld5DigZip" runat="server" 
                                   
                                     ControlToValidate="txtZip" ErrorMessage="5 digit zip code required" 
                                     ValidationExpression="^\d{5}$" Display="None"></asp:RegularExpressionValidator>
   
                <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="ReportTypeID" 
                                ErrorMessage="Report type required" 
        Font-Bold="True" Operator="NotEqual" ValueToCompare="0" Type="Integer" 
        CssClass="validError" Display="None"></asp:CompareValidator>
                                 <asp:RegularExpressionValidator 
                ID="vldBorrEmail"
                runat="server" 
                ControlToValidate="txtBorrEmail"
                ErrorMessage="Proper email format required"
                ValidationExpression="^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$"
                CssClass="validError" Display="None"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator 
                ID="vldContEmail"
                runat="server" 
                ControlToValidate="txtContEmail"
                ErrorMessage="Proper email format required"
                ValidationExpression="^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$"
                CssClass="validError" Display="None"></asp:RegularExpressionValidator>
   
    <asp:CompareValidator ID="vldCompanyName" runat="server" 
        ControlToValidate="ClientID" Display="None" 
        ErrorMessage="Company name required" Operator="NotEqual" Type="Integer" 
        ValueToCompare="0"></asp:CompareValidator>
    <asp:RegularExpressionValidator ID="vld3BorrWkArea" runat="server" 
        ControlToValidate="txtBorrWorkArea" Display="None" 
        ErrorMessage="3 digits required in the Borrower work phone area code" 
        ValidationExpression="^\d{3}$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3BorrWkPrefix" runat="server" 
        ControlToValidate="txtBorrWorkPrefix" Display="None" 
        ErrorMessage="3 digits required in the borrower work phone prefix" 
        ValidationExpression="^\d{3}$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld4BorrWkSuffix" runat="server" 
        ControlToValidate="txtBorrWorkSuffix" Display="None" 
        ErrorMessage="4 digits required in the borrower work phone suffix" 
        ValidationExpression="^\d{4}$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3BorrCellArea" runat="server" 
        ControlToValidate="txtBorrCellArea" Display="None" 
        ErrorMessage="3 digits required in the Borrower cell phone area code" 
        ValidationExpression="^\d{3}$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3BorrCellPrefix" runat="server" 
        ControlToValidate="txtBorrCellPrefix" 
        ErrorMessage="3 digits required in the borrower work phone prefix" 
        ValidationExpression="^\d{3}$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3BorrCell" runat="server" 
        ControlToValidate="txtBorrCellSuffix" Display="None" 
        ErrorMessage="4 digits required in the borrower cell phone suffix" 
        ValidationExpression="^\d{4}$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3ContWorkArea" runat="server" 
        ControlToValidate="txtContWorkArea" Display="None" 
        ErrorMessage="3 digits required in the contact work phone area code" 
        ValidationExpression="^\d{3}$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3ContWorkPrefix" runat="server" 
        ControlToValidate="txtContWorkPrefix" Display="None" 
        ErrorMessage="3 digits required in the contact work phone prefix" 
        ValidationExpression="^\d{3}$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld4ContWorkSuffix" runat="server" 
        ControlToValidate="txtContWorkSuffix" Display="None" 
        ErrorMessage="4 digits required in the contact work phone suffix" 
        ValidationExpression="^\d{4}$"></asp:RegularExpressionValidator>
    <asp:RequiredFieldValidator ID="vldClientFeeRequired" runat="server" 
        ControlToValidate="txtClientFee" Display="None" 
        ErrorMessage="The client fee is required"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator ID="vldClientDueDateRequired" runat="server" 
        ControlToValidate="txtClientDueDate" Display="None" 
        ErrorMessage="Client due date required"></asp:RequiredFieldValidator>
    <br />
    <asp:RegularExpressionValidator ID="vld3ContHomeArea" runat="server" 
        ControlToValidate="txtContHomeArea" Display="None" ValidationExpression="^\d{3}$" 
        ErrorMessage="3 digits required in the contact home phone area code"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3ContHomePrefix" runat="server" 
        ControlToValidate="txtContHomePrefix" Display="None" ValidationExpression="^\d{3}$" 
        ErrorMessage="3 digits required in the contact home phone prefix"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3ContHomeSuffix" runat="server" 
        ControlToValidate="txtContHomeSuffix" Display="None" ValidationExpression="^\d{4}$" 
        ErrorMessage="4 digits required in the contact home phone suffix"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3ContCellArea" runat="server" 
        ControlToValidate="txtContCellArea" Display="None" ValidationExpression="^\d{3}$"
        ErrorMessage="3 digits required in the contact cell phone area code"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3ContCellPrefix" runat="server" 
        ControlToValidate="txtContCellPrefix" Display="None" ValidationExpression="^\d{3}$"
        ErrorMessage="3 digits required in the contact cell phone prefix"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="vld3ContCellSuffix" runat="server" 
        ControlToValidate="txtContCellSuffix" Display="None" ValidationExpression="^\d{4}$"
        ErrorMessage="4 digits required in the contact cell phone suffix"></asp:RegularExpressionValidator>
</form>
</body>
</html>

Open in new window

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now