i have found a 3rd party javascript function to do a postcode search.
is it possible to use this in a dialog2? or on a html page and post the results to a table?
i have copied the .js file to my web project
added this code to the head section tag of a dialog2 properties
i have added a button to the dialog2 and added this code
thanks
is it possible to use this in a dialog2? or on a html page and post the results to a table?
i have copied the .js file to my web project
added this code to the head section tag of a dialog2 properties
Code:
<script type="text/javascript" charset="ISO-8859-1" src="js/crafty_postcode.class.js"></script> <script> var cp_access_token = "03450-36cb9-c1008-00878"; // var cp_obj_1 = CraftyPostcodeCreate(); cp_obj_1.set("access_token", cp_access_token); cp_obj_1.set("first_res_line", "----- please select your address ----"); cp_obj_1.set("res_autoselect", "0"); cp_obj_1.set("result_elem_id", "crafty_postcode_result_display_1"); cp_obj_1.set("form", "address"); cp_obj_1.set("elem_company" , "companyname"); // optional cp_obj_1.set("elem_street1" , "address1"); cp_obj_1.set("elem_street2" , "address2"); cp_obj_1.set("elem_street3" , "address3"); // or if you have only 2 address lines cp_obj_1.set("elem_street3" , ""); cp_obj_1.set("elem_town" , "town"); cp_obj_1.set("elem_county" , "county"); // optional cp_obj_1.set("elem_postcode" , "postcode"); cp_obj_1.set("elem_udprn" , "udprn"); // optional cp_obj_1.set("single_res_autoselect" , 1); // don't show a drop down box if only one matching address is found </script>
Code:
onclick="cp_obj_1.doLookup()"
thanks
Comment