I am trying to add a name(not the text shown) to a button on the bottom panel and can’t find a way to do it.
This is what I have so far…
$("#dialog-import-from-existing").dialog({
title: "Import From Existing",
autoOpen: false,
modal: true,
draggable: false,
resizable: false,
width: 500,
height: 525,
buttons: {
**name : "SubmitButton",**
"Import": function() {
$('#CreateForm').submit();
$(this).dialog('close');
},
"Cancel": function() {
//Need to added the js files to Driver studio.
//$("models-to-add-container").effect("explode");
$(this).dialog('close');
}
}
});
I’m trying to have this button with the name “SubmitButton”.
Thanks in advance.
The button option has two APIs. You’re using the original, simpler API of mapping the button label to a click function. You can also use an array of objects, which gives you much more control.
This API allows you to pass anything that can be passed to
.attr()plus event handlers.