I am creating the lightning component with a leaflet map and access via Visualforce page. In that page created the drop down with contact list. Based on list value i select what are records set the Location ( Latitude and Longitude ) the map will refresh.

I have doubt how to pass the parameter of the list values into the lightning component. Guide me how to achieve this

This Error I got Using the 'Firing Lightning Events from Non-Lightning Code ' Method:

Uncaught SecurityError: Blocked a frame with origin "https://lightnapp-dev-ed--c.ap2.visual.force.com" from accessing a frame with origin "https://lightnapp-dev-ed.my.salesforce.com". Protocols, domains, and ports must match.

My Vf Page Code:

<apex:includeLightning /> 

    <div id="lightning" >    


   var myExternalEvent;      
   if(window.opener.$A && (myExternalEvent = window.opener.$A.get("e.c:ContactsSelected"))) {

   var visualForceFunction = function(event){
        //alert('function test')
        var EventData = event.getParam("auragl");            

    $Lightning.use("c:ContactLocatorApp", function() {
      { },
      function(cmp) {          
        $A.eventService.addHandler({ "event": "c:ContactsSelected", "handler" : visualForceFunction});
        //alert('handler test');
<apex:form >
  <apex:selectList size="1">
      <apex:selectOptions value="{!ContactsList}" />
      <!-- <apex:actionSupport event="onchange" oncomplete="function(this)"/>-->



Probably you'll find an answer there:

"For the same-origin policy every browser blocks any script trying to access a frame with a different origin... Protocol, hostname and port must be the same of your domain, if you want to access a frame". SecurityError: Blocked a frame with origin from accessing a cross-origin frame

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.