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
MktdevMktdev 

Visualforce email template: Showing and Hiding Labels based on one field

Hi,

 

Can we write javascript onload on visualforce email template.

 

 

Ispita_NavatarIspita_Navatar

Yes through script in the visual force page you can achieve that.

MktdevMktdev

Thanks!

 

But I have been trying since long time but its not working.

 

function redirect() {

if({!relatedTo.active__c}=True
{
window.open('http://www.salesforce.com');

else

{

window.open('http://www.developer.force.com');

}
}
}

}
</script>

<body>

<a href="#" onClick="redirect();return false">Click Here</a>

    </body>