<link rel="stylesheet" type="text/css" href="dbnetsuite.css.ashx" /> <script language="JavaScript" src="dbnetsuite.js.ashx"></script>
<script> jQuery(document).ready( init ) function init() { var dbnetlist1 = new DbNetList("dbnetlist1"); with (dbnetlist1) { connectionString = "SamplesDatabase" sql = "select CompanyName,ContactName,Address,City,Region,Country,Phone,Fax from customers order by companyname" setColumnProperty(["contactname","address","city","region","country","phone","fax"],"display", false); width = "250px" height = "200px" rowSelection = true bind("onRowSelected", displayCustomer); initialize() } } function displayCustomer(list, args) { var ids = ["contactname","address","city","region","country","phone","fax"] for (var i=0; i < ids.length; i++) { jQuery("#" + ids[i]).val( list.columnValue(args.row, ids[i]) ); } } </script>
<table style="border:1pt solid #336699;"> <tr> <td style="vertical-align:top"> <div id="dbnetlist1"></div> </td> <td style="vertical-align:top"> <table> <tr> <td>Name</td> <td><input id="contactname" readonly size=30></input></td> </td> <tr> <td>Address</td> <td><input id="address" readonly size=30></input></td> </td> <tr> <td>City</td> <td><input id="city" readonly size=20></input></td> </td> <tr> <td>Region</td> <td><input id="region" readonly size=20></input></td> </td> <tr> <td>Country</td> <td><input id="country" readonly size=20></input></td> </td> <tr> <td>Phone</td> <td><input id="phone" readonly size=20></input></td> </td> <tr> <td>Fax</td> <td><input id="fax" readonly size=20></input></td> </td> </table> </td> </tr> </table>