ShowModalDialog quick upgrade solution, showmodaldialog
The original website used showModalDialog to pop up the box and PASS Parameters. It was not powerful in chrome and other browsers, and its compatibility was too poor. Therefore, the js layer was quickly upgraded.
1. on the original pop-up page, delete the old parameter passing code and leave a hidden record parameter.
2. Delete the old receiving parameter code from the parent form
# Selectinfo is the id of hidden. If you select a parameter to close the child form, the parameter is triggered to pass to the parent form.
<script src="js/jquery-1.8.3.js" type="text/javascript"></script> <script src="js/layer/layer.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $('#btn_addname').click(function () { $.layer({ type: 2, shadeClose: true, title: false, closeBtn: [1, true], shade: [0.6, '#000'], border: [0], offset: ['20px', ''], area: ['242px', ($(window).height() - 25) +'px'], iframe: { src: 'SelectPerson.aspx' }, close: function (index) { document.getElementById("receivername").value = layer.getChildFrame('#selectinfo', index).val(); } }); });</script>