Yannick Lefebvre,
To manually trigger the dialog opening through a link or button, set the “Number of times to display Modal Dialog” to 0. Then, use code like this on the page where you want to show a link to open the dialog:
Click here to open dialog
<script type=”text/javascript”>
function openDialog() {
jQuery(“a#inline”).trigger(‘click’)
}
</script>
In this case, the trigger to open the dialog is a text link but it could also be a button. Let me know if this works for you and mark the issue as resolved if it does.
The situation is as follows:
I would like to open a Modal Dialog with a command of a button, you explained above, however I need to use this method for over a Modal Dialog, example: In a gallery I will display several pictures of photographic books, and each gallery a single photographic book would put a button “click here to view this book” that opened the Modal Dialog that photographic book which loads an html external, ie the photographic book. Do not know if understood well, do not know if the Google translation I made is consistent.
Please explain to me how I would use the above code, I insert it directly into a post?
Thank you, Janeislan Barbosa, Brazil.