You need to sign in to do that
Don't have an account?
Qin Lu
how to make output link work for both drill down and open a new tab
I have a visual force page embedded in Contact detail page layout. I have a output link to drill down to detail custom object page. I have the following in my page, and it drill down correctly to detail custom object page, but it doesn't work when do right click Open in New Tab, I got
URL No Longer Exists error
<apex:outputLink onClick="window.top.location.href = '{!redirectUrl}';">{!fa[field]}
</apex:outputLink>
How to make the output link work for both drill down in the same window as well as Open in New Tab?
Thanks
URL No Longer Exists error
<apex:outputLink onClick="window.top.location.href = '{!redirectUrl}';">{!fa[field]}
</apex:outputLink>
How to make the output link work for both drill down in the same window as well as Open in New Tab?
Thanks
Best Answer chosen by Qin Lu
bob_buzzard
Open in new tab will try to open the URL in the anchor tag generated from the output link, but you haven't provided one. You'll need to add the target URL and make the onclick handler return false so that you don't get a race condition. The following should do the trick: