This is driving me nuts. I've been banging my head against this for a couple of days now and it seems like this should be really simple. I have a jQuery EasyUI page that I'm building and it has a datagrid that opens a dialog box when you select and click on a button for details. This is working perfectly fine. The problem is that I want to add a button link at the bottom of the dialog along with the "default" save and cancel buttons.
This new button is really just a redirect link to another page that will display all of the selections details rather than just an abbreviated bit of the information. Here is the code that opens the dialog and then below that is the code for the link button.
function editUser(){
var row = $('#dg').datagrid('getSelected');
if (row){
$('#dlg').dialog('open').dialog('setTitle','Prospect Details');
$('#fm').form('load',row);
url = 'update_user.php?id='+row.id;
$('#dia_name').html(row.Name);
$('#pd a').attr('href','prospect_details.php?phone=' + row.Phone);
var phone = phoneFormat(row.Phone);
$("#dia_phone").html(phone);
if (row.message_duration > 0) {
$('#hangup').hide();
$('#message').show();
$('#msg_txt').show();
} else {
$('#hangup').show();
$('#message').hide();
$('#msg_txt').hide();
}
}
Now for the code of the link button.
<a id="pd" class="easyui-linkbutton" iconCls="icon-search">More Details</a>
This is really driving me crazy. I think the problem has to do with the link button not existing when the editUser function is called since that resides in the dialog window.