Hi Dear,
I have a code to open a Dialog box, but it always opens in center of the page. I need it opens on top of page. I already tried this code below, but it didn't work too.
//Get the offset position of anchor link relative to the document
var offset = oTableLink.$().offset(); or // $("#link_id").offset();
//Set the position of dialog relative to the document
- oDialog.$().offset({
top : offset.top
left : offset.left
})
Here is my code:
var oDialog1 = new sap.ui.commons.Dialog({ modal: true});
oDialog1.setTitle("Production Confirmation:");
oDialog1.addContent(oMatrix);
oDialog1.addButton(oButtonConfirm);
oDialog1.addButton(oButtonCancel);
oDialog1.open();
Best regards,