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
srikanth nsrikanth n 

how to add image in pageblock table and can we perform action on onclick image...any plz help me out..thx in advance frds

how to add image in pageblock table and can we perform action on onclick image...any plz help me out..thx in advance frds.
logontokartiklogontokartik
Should be as simple as adding it in HTML.

<pre>
<apex:column>
<a href="#"><img src="http://google.com" height="10" width="10"</img></a>
</apex:column>
</pre>
ScriptMonkeyScriptMonkey
I'd suggest keeping it Visualforce by using <apex:image>.  It supports the onclick parameter as well, so there's no need to do an <a> call around it or anything.

That lets you more easily tie it in with rerenders and the like if you want the image to change after clicking.  Other than that it's as logontokartik said:

<apex:column>
<apex:image value="IMGURL" id="someImage" onclick="someJavaScript" />
</apex:column>