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
Gaurav GulanjkarGaurav Gulanjkar 

Opening an image in parent window

Hi Guys,

 

I am using onclick event to open an image which is attached in the attachments.I have to opent that image in the parent window insted of new window.How would i go to achive it.Following is the code i am using.

 

<a onclick="window.open('{!URLFOR($Action.Attachment.Download, attachment.value)}')" href="#" ><apex:image value="{!URLFOR($Action.Attachment.Download, attachment.value)}" width="80px" height="80px"/></a>

 

 

Thanks,

Gaurav Gulanjkar

ibtesamibtesam

Refer this

http://www.w3schools.com/tags/att_a_target.asp

 

<a onclick="window.open('{!URLFOR($Action.Attachment.Download, attachment.value)}')" href="#"  ><apex:image value="{!URLFOR($Action.Attachment.Download, attachment.value)}" width="80px" height="80px"/></a>

 

try target = "_parent"

 

Gaurav GulanjkarGaurav Gulanjkar

I tried using target="_parent".But it did'nt work.