You need to sign in to do that
Don't have an account?
Unexpected Token Else
For some reason I keep getting the error "Unexpected Token Else" and I can't figure out why.
If( {!Model_Promo_Request__c.Model_Promo_Criteria_Validation__c} == TRUE) { window.open('{!URLFOR($Action.Model_Promo_Request__c.Submit,Model_Promo_Request__c.Id)}'); } else{ alert('Your request is missing information required for approval.'); }
All Answers
<aura:component extends="c:LCC_GenericLightningComponent" > <aura:handler event="c:LCC_GenericApplicationEvent" action="{!c.execute}"/> <aura:set attribute="partially" value="false"></aura:set> <aura:attribute name="showAlert" type="Boolean" default="false"/> <aura:attribute name="alertText" type="String"/> <aura:set attribute="isAdditionalObject" value="false"></aura:set> <div> <div class="slds-scrollable slds-p-around_medium slds-text-heading_small" id="modal-content-id-1"> <aura:if isTrue="{!v.showAlert}"> <p class="slds-hyphenate">{!v.alertText}</p> <aura:set attribute="else"> <div style="height: 6.75rem;"> <div role="status" class="slds-spinner slds-spinner_large slds-spinner_brand"> <span class="slds-assistive-text">Loading</span> <div class="slds-spinner__dot-a"></div> <div class="slds-spinner__dot-b"></div> </div> </div> </aura:set> </aura:if> <br/> </div> <footer class="slds-modal__footer"> <lightning:button class="slds-button_brand" onclick="{!c.accept}" label="Accept"/> </footer> </div> </aura:component>
What do I need to do? Thanks!