Help - Search - Members - Calendar
Full Version: Alternative Locator Form locations...
User Forums > Pre-Sales > Pre-Sales Q&A
inSpheria
Hey there! I'm very interested in this script, but am concerned about how customizable it will be for our needs.

We are wanting to have a "dealer locator" form located on all pages throughout my client's website. All of the sample installations I have seen on the website only have the "form" located within the /locator/ directory... the same place that all the other pages are located (am I making sense here?)

If anyone could provide me with a link toa website that has done something similar I would appreciate it!

Thanks!
Brian
You can copy the form that is output on the /locator/index.php page to any existing page in your website. This will give you access to the program easily from any page of your site.


Here is an example of the needed html code:

CODE
Here is the javascript code to place in your document's <head> section
:
<script language="JavaScript">
function validatezip()
{
// Lets make sure a Zip Code is entered:
var zip = document.form2.zip.value;

if(zip == "")
{
alert("Please enter a Zip Code to continue.");
document.form2.zip.focus();
return false;
}

else {
return true;
}
}
</script>


CODE
Here is the form HTML code to put anywhere on your page:

<table border="0">
<form name="form2" method="get" action="results_list.php" onSubmit="return validatezip()">
          <tr>
            <td colspan="2" bgcolor="#EBEBEB" align="center">
            <b><font size="2">Search USA and Canada by Zip Code</font></b><font size="2">:</font></td>
          </tr>
          <tr>
            <td align="right" valign="top"><font size="2">Zip Code:</font></td>
            <td><input type="text" name="zip" size="10" maxlength="7"><br>
            <input type="checkbox" name="showsurrounding" value="1" checked><font size="2"> Show surrounding</font></td>
          </tr>
          <tr>
            <td colspan="2" align="center"><input name="zipsearch" type="submit" id="button1" value="Search"></td>
          </tr>
        </form>
</table>


The above is an example of adding the "Enter Your Zip Code" box on any page of your exisitng site. You would also be able to add other search types, such as city, name, state or country, by following the same example.

Hope this helps!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.