I have a page where I've tried to put a JQuery dialog where data is entered and later goes to a server. The problem I've encountered is that the dialog is outside the form
tag, since that whole data I enter is lost somewhere. It looks like this:
I've tried this so far:
var dialogAddPartDiv = $('.dialogAddPart');
$('form').append(dialogAddPartDiv);
But it only appends dialogAddPart, not its parents.
The command $('form').append('.ui-dialog')
doesn't work in this case. How can I add the parent div of .dialogAddPart in form? The technology I use is XPages, since that I cannot use a inner button inside dialog declaration to proccess AJAX request, all that stuff is defined inside the XPage itself.
The show() method shows the dialog. When this method is used to show a dialog window, the user is still able to interact with other elements on the page. If you do not want the user to interact with things other than the dialog, use the showModal() method.
<dialog>: The Dialog element. The <dialog> HTML element represents a dialog box or other interactive component, such as a dismissible alert, inspector, or subwindow.
var iHeight = $('#dialog'). height() + 16; After the dialog is created, set the new width for the dialog wrapper and start an animate if the current height is lower then the calculated.
A dialog is opened by calling the open method with a component to be loaded and an optional config object. The open method will return an instance of MatDialogRef : let dialogRef = dialog. open(UserProfileComponent, { height: '400px', width: '600px', }); The MatDialogRef provides a handle on the opened dialog.
jQuery UI Dialog has an appendTo option which allows you to append the dialog to some element:
$( ".selector" ).dialog({
appendTo: "#someElem"
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With