+ Start a Discussion
riffindusriffindus 

adding javascript to an apex:image onclick event

Hi,

 

i am adding an javascript function to an onclick event of an image. i am not getting the javascript working on clciking...below is my code

 

 <apex:image  url="{!URLFOR($Resource.Style,'/styling/images/icon.jpg')}" onclick="javascript&colon;SendData('page',execute,'yes');"/>

 

javascript file added is accessible from the page, oher functions are working....

 

if i add the same onclick event function to a button, it calls the javascript function. only the image is not triggering. but my requirment is to add it on the image onclick.

 

Please help.

 

 

Shiv ShankarShiv Shankar

Riffindus the code is looking fine.

 

1. Can you match function-name which you have given and name which you have put on onClick Event.... Because Case Sensitivity matters here.

 

If it's all right please post full code....

 

riffindusriffindus

the function is working properly. it is not related to function. because i added the copy paste of the function name in link and buttin...it is working...only for image it is not working. even i am not getting the hand icon also. anything am missing?

Shiv ShankarShiv Shankar
Please post full code