+ Start a Discussion

open a new webpage when click "apex:outputLink"

Can you give me sample code for opening a new webpage when I click on a image.

This is the image display:-


<apex:image url="{!URLFOR($Resource.Playbook_Resource, 'assets/css/img/bestPractice.png')}" onclick="javascript&colon;NewPage('{!object.pageurl}'/> 


I am storing the URL of the new image in the field object.pageurl

Best Answer chosen by Admin (Salesforce Developers) 
Val ValinoVal Valino


<apex:image url="{!URLFOR($Resource.Playbook_Resource, 'assets/css/img/bestPractice.png')}" onclick="window.open('{!object.pageurl}');"/> 




Try this