First you'll need a form on a page on your public to allow your visitors to choose some search parameters. Allowable search parameters are described on the main dealer_locator page. Specify target=dealerLocatorFrame” in the form tag, and fill in the URL of your channelsuite install in the “action” parameter of the form tag. The form will be posted to the channelsuite server and the results will be displayed in the iframe called dealerLocatorFrame on your html page.
In the following example we allow a choice of search by zip code (parameters zip and distance) or US state (parameter state)
<form method=POST target="dealerLocatorFrame" action="http://<your channelsuite URL>/API/DealerLocator/"> <h2>In the US?</h2> Please enter your 5-digit zip code: <input id="zip" name="zip" type="text" size=7><br/> <span class="label">...match within:</span> <select id="distance" name="distance"> <option value="5">5 miles</option> <option value="10">10 miles</option> <option value="15">15 miles</option> <option value="20" selected>20 miles</option> <option value="25">25 miles</option> <option value="30">30 miles</option> <option value="35">35 miles</option> <option value="40">40 miles</option> <option value="45">45 miles</option> <option value="50">50 miles</option> <option value="100">100 miles</option> </select><br/><br/> - or -<br/><br/> Select a state: <select id="state" name="state"> <option value=''>Select...</option> <option value='1'>Alabama</option> <option value='2'>Alaska</option> <option value='3'>Arizona</option> <option value='4'>Arkansas</option> <option value='5'>California</option> <option value='6'>Colorado</option> <option value='7'>Connecticut</option> <option value='52'>DC</option> <option value='8'>Delaware</option> <option value='9'>Florida</option> <option value='10'>Georgia</option> <option value='11'>Hawaii</option> <option value='12'>Idaho</option> <option value='13'>Illinois</option> <option value='14'>Indiana</option> <option value='15'>Iowa</option> <option value='16'>Kansas</option> <option value='17'>Kentucky</option> <option value='18'>Louisiana</option> <option value='19'>Maine</option> <option value='20'>Maryland</option> <option value='21'>Massachusetts</option> <option value='22'>Michigan</option> <option value='23'>Minnesota</option> <option value='24'>Mississippi</option> <option value='25'>Missouri</option> <option value='26'>Montana</option> <option value='53'>NA</option> <option value='27'>Nebraska</option> <option value='28'>Nevada</option> <option value='29'>New Hampshire</option> <option value='30'>New Jersey</option> <option value='31'>New Mexico</option> <option value='32'>New York</option> <option value='33'>North Carolina</option> <option value='34'>North Dakota</option> <option value='35'>Ohio</option> <option value='36'>Oklahoma</option> <option value='37'>Oregon</option> <option value='51'>Other</option> <option value='38'>Pennsylvania</option> <option value='39'>Rhode Island</option> <option value='40'>South Carolina</option> <option value='41'>South Dakota</option> <option value='42'>Tennessee</option> <option value='43'>Texas</option> <option value='44'>Utah</option> <option value='45'>Vermont</option> <option value='46'>Virginia</option> <option value='47'>Washington</option> <option value='48'>West Virginia</option> <option value='49'>Wisconsin</option> <option value='50'>Wyoming</option> </select> <br/><br/> <div align=center><input value="Find Dealers" type="submit"></div> </form>
Then put an empty iframe with name=“dealerLocatorFrame” somewhere on your page to hold the results. it should be at least 700 px wide.
<center> <iframe name="dealerLocatorFrame" style="width: 95%; border: none;" src="" id="dealerLocatorFrame"></iframe> </center>