0

i have a problem, the first click on button, have functionaly, but in second click return this error.

sp.ui.dialog.js?rev=3Oh2QbaaiXSb7ldu2zd6QQ%3D%3D:2 Uncaught TypeError: Cannot read property 'getElementsByTagName' of null
    at SP.UI.ModalDialog.$1o_0 (sp.ui.dialog.js?rev=3Oh2QbaaiXSb7ldu2zd6QQ%3D%3D:2)
    at SP.UI.ModalDialog.$25_0 (sp.ui.dialog.js?rev=3Oh2QbaaiXSb7ldu2zd6QQ%3D%3D:2)
    at SP.UI.ModalDialog.$25_0 (sp.ui.dialog.js?rev=3Oh2QbaaiXSb7ldu2zd6QQ%3D%3D:2)
    at Function.SP.UI.ModalDialog.showModalDialog (sp.ui.dialog.js?rev=3Oh2QbaaiXSb7ldu2zd6QQ%3D%3D:2)
    at HTMLAnchorElement.<anonymous> (default.aspx:922)
    at HTMLAnchorElement.dispatch (jquery-1.10.2.js:5095)
    at HTMLAnchorElement.elemData.handle (jquery-1.10.2.js:4766)

Stay call to this:

                    $(document).ready(function() {
                        $('#modal').click( function(){
                            $('#program').show();
                            SP.UI.ModalDialog.showModalDialog({
                                html: document.querySelector('#program'),
                                title: " ",

                                showClose: true,
                                autoSize: true
                            });
                        });
                    });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.