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
Sahil Yadav 4Sahil Yadav 4 

Aura Component Issue

Hello Developers,
 I had one aura comp which holds 3 dropdown values  and my requirement is on click of specific values some specific external sites should be get opened up .



User-added image





  
So the above is component which hold three value such as canada , uk, usa and on click different page or site should be get opened up sharing the code please suggests where i did wrong..
 
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
	<aura:attribute
        name="modes"
        type="List"
        default="[
    {'label': 'UK', 'value': 'uk'},
    {'label': 'CANADA', 'value': 'canada'},
    {'label': 'Hard', 'value': 'hard'},
    ]"
    />
    <lightning:card title="SELECT COUNTRY">
        <lightning:layout horizontalAlign="center" multipleRows="true">
            <lightning:layoutItem padding="around-small">
                <lightning:combobox
                    name="gameMode"
                    label="Game Mode"
                    value="inProgress"
                    variant="label-hidden"
                    aura:id="gameMode"
                    options="{!v.modes}"
                    placeholder="Select Game Mode"
                />
            </lightning:layoutItem>
        </lightning:layout>
    </lightning:card>
</aura:component>







Js


({

    navigate : function(component, event, helper) {

    //Find the text value of the component with aura:id set to "address"
    var address = component.find("gameMode").get("v.value");

    var urlEvent = $A.get("e.force:navigateToURL");
    urlEvent.setParams({
      "url": 'https://www.google.com/maps/place/' + address
    });
    urlEvent.fire();
}
})


 
PriyaPriya (Salesforce Developers) 

Hey Sahil,

You may take the idea from this example :- 

https://salesforce.stackexchange.com/questions/106015/lightning-how-do-i-get-the-selected-value-from-a-select-dropdown-list-send-i

If it helps, kindly mark it as the best answer.

Regards,

Priya Ranjan