function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kathryn Lee 10Kathryn Lee 10 

search not working on visualforce page

I have created a visualforce page that actually looks up to a webpage. that webpage actually pings a MetaLocator database. Everything displays nicely and the navigation works, except for one thing. When you enter search parameters and click the Submit button, nothing happens. Anyone have any ideas? My code is below.


<apex:page sidebar="false">

<apex:image url="http://www.preparemag.com/wp-content/uploads/2012/08/print_icon1.gif" width="25" height="25" onclick="printFunc();return false;"/>

<script type="text/javascript"> function printFunc(){ window.print(); } </script>

<script type="text/javascript" src="https://www.google.com/jsapi">
</ script>

<script type="text/javascript">google.load("maps", "3", {other_params:"sensor=false"});</script><script language="javascript" src="//code.metalocator.com/index.php? option=com_locator&view=directory&layout=_javascript&framed=1&format=r aw&tmpl=component&no_html=1&Itemid=3627">
</script>

</apex:page>
 
Best Answer chosen by Kathryn Lee 10
Andy BoettcherAndy Boettcher

When you're working with components that utilize Javascript, the browser's developer console is your best friend.  =)

The error you're getting is:  Mixed Content: The page at 'https://code.metalocator.com/index.php?option=com_locator&view=directory&layout=combined&Itemid=3627&tmpl=component&framed=1&source=js' was loaded over HTTPS, but requested an insecure script 'http://code.metalocator.com/index.php?option=com_locator&view=directory&for…med=1&tld=us&cachebust=1433735934027&callback=jsonCallback&_=1433735934029'. This request has been blocked; the content must be served over HTTPS.

In english :) what that means is that while the page is loading - when you hit the submit button the component is trying to load a script over regular HTTP, not HTTPS.  Salesforce requires all scripts to be loaded via HTTPS in the manner that this one is executing.

What wI would recommend is that you contact the metalocator service and give them this error.  They may be able to provide you an additional parameter that will load their scripts in HTTPS.

All Answers

Andy BoettcherAndy Boettcher

When you're working with components that utilize Javascript, the browser's developer console is your best friend.  =)

The error you're getting is:  Mixed Content: The page at 'https://code.metalocator.com/index.php?option=com_locator&view=directory&layout=combined&Itemid=3627&tmpl=component&framed=1&source=js' was loaded over HTTPS, but requested an insecure script 'http://code.metalocator.com/index.php?option=com_locator&view=directory&for…med=1&tld=us&cachebust=1433735934027&callback=jsonCallback&_=1433735934029'. This request has been blocked; the content must be served over HTTPS.

In english :) what that means is that while the page is loading - when you hit the submit button the component is trying to load a script over regular HTTP, not HTTPS.  Salesforce requires all scripts to be loaded via HTTPS in the manner that this one is executing.

What wI would recommend is that you contact the metalocator service and give them this error.  They may be able to provide you an additional parameter that will load their scripts in HTTPS.

This was selected as the best answer
Kathryn Lee 10Kathryn Lee 10
Andy, Thank you for the information and the help. We were able to get it worked out with metalocator on their side and it is working!!