You need to sign in to do that
Don't have an account?
Deepu Gupta 29
java script code issue
Hi All,
My code is like this :
But its not navigating me on the Hierarchy_Clone page on the clickling the link of the Inculde Contact.Could any one suggest me on that?Its on urgent basis.
My code is like this :
<apex:page standardController="Account"> <apex:form > <apex:pageBlock > <apex:pageBlockSection title="Account Hierarchy" columns="2"> <c:HierarchyTree currId="{!Account.id}" /> </apex:pageBlockSection> </apex:pageBlock> <table align ="centre"> <tr> <td><apex:commandLink action="{!Cancel}" target="_top" value="BacktoAccount" id="theButton1"/></td> <td></td> <td></td> <td><apex:commandLink value="IncludeContact" target="_top" onclick="redirect();"/></td> </tr> <script> function redirect(){ var accId = '{!$CurrentPage.parameters.Id}'; if( (typeof sforce != 'undefined') && (sforce != null) ) { sforce.one.navigateToURL('/apex/Hierarchy_Clone?id='+accId); } else{ window.open('/apex/Hierarchy_Clone?id='+accId,'_parent'); } } </script> </table> </apex:form> </apex:page>
But its not navigating me on the Hierarchy_Clone page on the clickling the link of the Inculde Contact.Could any one suggest me on that?Its on urgent basis.
Rohit Sharma 66
Can you please try putting the alert inside the javascript code, it will hepl u determine till where your code is executing. And what is the use of line 22, why u not checking the accId field instead, like accId not null and not blank.