popup on button click and image clickpopup on button click and image clickhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=133540792024-03-28T11:37:15Z2024-03-28T11:37:15ZRE: popup on button click and image clickHitoshi Ozawahttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=133643122012-04-07T12:28:49Z2012-04-07T12:28:49ZNot sure on what you're trying to do.<br /><br />In your button, you've set id.<br /><blockquote><button id="akash"></blockquote><br /><br />In you img, you set a function call.<br /><img src="<%= sht %>" height="50%" width="50%" onclick="akash"/><br /><br />In your javascript, you're executing on a event click on id.<br />A.one('#akash').on('click', function() {<br /><br />Simply by looking, have you tried setting id on your img tag instead of onclick?<br /><div id="akash"><img src="<%= sht %>" height="50%" width="50%" /></div>Hitoshi Ozawa2012-04-07T12:28:49Zpopup on button click and image clickakash rathodhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=133540782012-04-06T10:58:41Z2012-04-06T10:58:41Z<html><head></head><body>hi. everybody <br><br>i use button on click for calling popup..it's working<br><pre><code> <button id="akash">Show All</button></code></pre><br><br>but for image it not work<br><pre><code><img src="<%= sht %>" height="50%" width="50%" onclick="akash"></code></pre><br><br>my script for popup is <br><pre><code>AUI().ready('aui-dialog', function(A) {
A.one('#akash').on('click', function() {
var scrt="/html/12812.jpg";
var html='<img src="/html/12812.jpg"> ';
var dialog2 = new A.Dialog(
{
header: 'display image',
title: 'Dialog',
bodyContent:html,
position:'center',
modal:true,
xy: ['center', 100],
}
).render();
});
});</code></pre><br><stron