JSFiddle - React, Tailwind, and code Playground
HTML
<input type="submit" onclick="addeditUser();" value="click me to show box"></input>
<div id="popup">
</div>
JavaScript
function addeditUser() {
jQuery('#popup').load("form.html", showDialog);
alert(jQuery('#popup').text());
}
function showDialog() {
jQuery('#popup').dialog( {
modal: true,
title: 'Edit User',
resizable: false,
width: 'auto',
autoOpen: false,
open: function() {
jQuery( "button, input[type=submit]" ).button();
secondarySiteDisplay();
if ( jQuery('#ptsiid').length != 0 ) {
jQuery('#ptsiid').focus();
jQuery('#popup').dialog().width(jQuery('#popup').width());
} else {
document.forms.editform.firstname.focus();
}
}
});
jQuery('#popup').dialog('open').height('auto');
return false;
}