- To search for a company by name and department (or postal code), simply call the "by_name" method by providing 3 parameters:
-
- Text searched
- Department or postal code
- The name of a callback function
Example:
b2b.by_name($('#id_search').val(), $('#id_dept').val(), 'callback1');
- To search for a company by its number (SIREN or SIRET), simply call the "by_number" method by providing 2 parameters:
-
- The search number
- The name of a callback function
Example:
b2b.by_number($('#id_siren').val(), 'callback1');
- To search for a company by address, simply call the "by_address" method having instantiated the library with the keys "address", "postalCode" and "city":
b2b = $('#id_form').dqe({
server : 'jsonp',
license: 'LICENSE CODE PROVIDED BY DQE',
address : '#id_address_field',
postalCode : '#id_zip_field',
city : '#id_city_field',
ac_company: '#id_company_field'
});
During the call, the function will propose in the company search field the companies present at the address entered in the various fields "address", "postalCode" and "city".
Call example:
b2b.by_address('callback1');