How to put buttons in a html page in a jQuery dialog
- by Robert
eHello everyone,the following is my code to display a jquery dialog window with a closing button "OK":
<script type="text/javascript">
$(function(){$("#dialog").dialog({autoOpen:false,bgiframe:true,buttons: { "OK":
function() { $(this).dialog("close"); } }, width:500, height: 350, modal: true,
show: 'slide', hide:'slide', title:"Similar Trends Detected in 2nd DataSet"});
$("#userid").focus();
});
function showForm(matches){
$("#dialog").html(matches).dialog("open");}
Currently it runs by supplying a string variable "matches",then the content of the variable gets displayed on the dialog frame.
Now me and my teammate want to extend this dialog a little,we want to attach a button to every line inside the html content("matches" variable),please note that we don't want buttons in the dialog(like another "OK" button),but we want buttons "inside" the frame (the actual html content).
So I would like some help here,how could I modify my "matches" variable,to have buttons also shown inside the dialog.
Thanks.