Whether you are using our MySLP SaaS service or our WordPress plugins for Store Locator Plus, having a web page that is loading “clean” JavaScript code is CRITICAL to the functionality of your locator.   Most web pages today, and certainly those including an interactive map, are far removed from static HTML and images.   Today’s web pages are full-on applications.   They are programs that are running locally on your device to draw a page that looks similar to the old-time static HTML pages but with a lot more cool interactions; like maps.

While these new interfaces are cool and certainly make the web easier to use they come at a cost.   It requires that all of the little mini-applets that you are loading on a page to show to your users play nicely together.   Every single interactive component like that Google Ads sidebar, the Recaptcha validation and maps are all separate programs that are playing in the same “pool”.    The problem with this is that it is very easy for any one of those components to “go haywire” and spoil the fun for everyone else.

Part of the issue is that for most web page builders you have ZERO control over WHEN you get your turn to jump in the pool.   Do you get in first?   Or do you get in after someone left their “code turd” in the pool?   How well your app runs can depend a lot on WHEN it gets to run.  To make matters more complicated an interactive page may not “sprout new problems” until AFTER the user starts interacting with the page.   Maybe it happens when a user clicks on an ad that is being tracked which then breaks the code and all subsequent JavaScript is running in a “polluted pool”.

Often the Store Locator Plus map is the most visual an interactive element on the page.  It happens to be what most people notice first when JavaScript is broken.   You won’t notice if your ad-click is not being tracked but you sure as heck notice when you try to look up locations and the map doesn’t change.    Often the cry goes out “you broke the locator” when many times it is something else that broke well before the locator had a chance to do its work.

Check For JavaScript Code Errors

Use your web browser developer tools.   All modern browsers have this functionality and it can give you some clues as to what is really going on.    If you see errors in the console you will want to clean this up and see if it resolves the issues with the locator.

Safari

Go to Safari | Preferences | Advanced and click “Show Develop menu in menu bar”.

Safari Turn On Dev Tools
Safari Turn On Dev Tools

 

To check your JavaScript Console go to Develop | Show JavaScript Console

Look for any red exclamation marks and look at the error logs to suss out JavaScript code issues.

JavaScript Code Errors In Web Console
JavaScript Code Errors In Web Console

Firefox

Older versions of Firefox have the web developer tools enabled by default.  If you do not see the Web Developer menu option check under the Settings menu a this may be disabled by default in future releases.

To view possible JavaScript errors:

Go to Tools | Web Developer | Web Console

 

Learn More In This Video

Check out this video to learn more about the technical details of why JavaScript loading order and errors in other JavaScript code is important.

 

If you are not seeing JavaScript code errors on your page and your Store Locator Plus map is still not working please contact us!