I had a input button to which I called a javascript function when clicked. But I want to add images to the button So I used a Image button but I am not able to call the Javascript function from the image button. How to run the javascript fn when the image button is clicked
<input id="send" type="button" value=" Preview on iPhone " onclick="javascript:preview()">
<asp:ImageButton OnClick="preview()" ID="send" runat="server" ImageUrl="Styles/Images/preview_iphone.png"
OnMouseOut="this.src='Styles/Images/preview_iphone.png'"
OnMouseOver="this.src='Styles/Images/preview_iphone_over.png'" />
try the
OnClientClick="javascript:preview()"that’s the one for the client side click.from here