Paul_s
09/02/2021, 12:48 PMbattk
09/02/2021, 12:50 PMbattk
09/02/2021, 12:51 PMPaul_s
09/02/2021, 12:55 PMif(scriptContext.type != scriptContext.UserEventType.VIEW) {
scriptContext.form.clientScriptFileId = 44511;
var list = scriptContext.form.getSublist('item');
list.addButton({
id: 'custpage_add_po_items',
label: 'Add PO Items',
functionName: 'addPOItems'
});
const dialogHTMLField = scriptContext.form.addField({
id: 'custpage_jqueryui_add_dialog',
type: 'inlinehtml',
label: 'add po lines html field'
});
dialogHTMLField.defaultValue = file.load({
id: 'SuiteScripts/ContractPurchasing/dialoghtml.html'
}).getContents();
}
The contents of the HTML file:
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="<https://code.jquery.com/ui/1.12.1/jquery-ui.js>"></script>
<div id="_add_dialog" title="Add dialog"></div>
<style type="text/css">
.ui-dialog .ui-dialog-title {
text-align: center;
width: 100%;
}
</style>
The Client script call
jQuery("#_add_dialog").dialog({
width: 400,
height: 450,
modal: true,
src: "<https://xxx-sb1.app.netsuite.com/app/site/hosting/scriptlet.nl?script=444&deploy=1>",
close: function () {
// $("#thedialog").attr('src', "about:blank");
}
});
Sandii
09/02/2021, 1:00 PMSandii
09/02/2021, 1:01 PMjQuery("#_add_dialog")
is anything, you can test this in the console, if that is nothing then your problem is before you get to the clientPaul_s
09/02/2021, 1:02 PMPaul_s
09/02/2021, 1:04 PMbattk
09/02/2021, 1:09 PMbattk
09/02/2021, 1:09 PMbattk
09/02/2021, 1:09 PMbattk
09/02/2021, 1:10 PMPaul_s
09/02/2021, 1:11 PMPaul_s
09/02/2021, 1:12 PMSandii
09/02/2021, 1:17 PMtype="text/javascript"
before the src
inside the script tag, not sure that is really the problembattk
09/02/2021, 1:18 PMbattk
09/02/2021, 1:19 PMPaul_s
09/02/2021, 1:19 PMbattk
09/02/2021, 1:19 PMbattk
09/02/2021, 1:21 PMbattk
09/02/2021, 1:23 PMbattk
09/02/2021, 1:24 PMPaul_s
09/02/2021, 1:26 PM