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
Lakshmi Kumar 7Lakshmi Kumar 7 

javascript custom button open new tab

Hello All,

Earlier I had a requirement where on click of a button a new pop-up window should open that displays the information. Below is the Javascript that I developed and which is working fine.
 
window.open("/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&p26=xxx@xxx.com&template_id=00Y4C000000CFTG&retURL=%{!Case.Id}","_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, width=800, height=650");
Now my client says they want that button to open in a new tab rather than the pop-up. Can somebody tell me how to change my JS code to accommodate the new requirement? 

Thanks :) 
Best Answer chosen by Lakshmi Kumar 7
RD@SFRD@SF
Hi Lakshmi

Try this
 
window.open("/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&p26=xxx@xxx.com&template_id=00Y4C000000CFTG&retURL=%{!Case.Id}","_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, width=800, height=650","_BLANK");



Regards
RD
 

All Answers

RD@SFRD@SF
Hi Lakshmi

Try this
 
window.open("/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&p26=xxx@xxx.com&template_id=00Y4C000000CFTG&retURL=%{!Case.Id}","_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, width=800, height=650","_BLANK");



Regards
RD
 
This was selected as the best answer
Lakshmi Kumar 7Lakshmi Kumar 7
@RD: Thanks a lot :) This works!!! 
RD@SFRD@SF
Happy to help

Regards
RD