You need to sign in to do that
Don't have an account?
Salesforce seekar
very urgent### window.close() not working in Experience site built in Aura
Hi All ,
I have an experience site built on Aura frame work .
I have built an aura component for cancel button , when ever user clicks cancel , the tab having the site should close automatically . can anyone help its urgent
my cmp code:
<aura:component>
<lightning:button variant="brand-outline" label="Cancel" title="Brand action" onclick="{! c.handleClick }" />
</aura:component>
({
handleClick : function (cmp, event, helper) {
alert("You clicked: " + event.getSource().get("v.label"));
window.close();
}
});
I have an experience site built on Aura frame work .
I have built an aura component for cancel button , when ever user clicks cancel , the tab having the site should close automatically . can anyone help its urgent
my cmp code:
<aura:component>
<lightning:button variant="brand-outline" label="Cancel" title="Brand action" onclick="{! c.handleClick }" />
</aura:component>
({
handleClick : function (cmp, event, helper) {
alert("You clicked: " + event.getSource().get("v.label"));
window.close();
}
});
Hi Salesforce seekar,
You are checking this in builder that is why it is not working. It will work fine if you will check it after publishing and going to site(Not builder)
Please mark it as the best answer if it will help you.
Thanks
Let me know if you are seeing anything different. Thanks
Thanks for responding......
its not working in my chrome browser... alert is comming but browser is not closing . you may please try to paste below site on browser and click .
https://lwc16-dev-ed.my.site.com/pincode-search