none
Submitting the form with ?isdlg=1 must redirect to same page RRS feed

  • Question

  • Hi ,

    I am using sharepoint 2013

    I am submitting a list data in Newform.aspx by appending isdlg=1. Usually it will redirect to some page but appending isdlg=1 and submitting the form taking me to white empty page.

    Eg: https://moss-abc/sites/xxx/Lists/abc/NewForm.aspx?isdlg=1

    How can I redirect to same page https://moss-abc/sites/xxx/Lists/abc/NewForm.aspx?isdlg=1 instead of white space.

    Please help


    Remember Past Challenge Future"

    Tuesday, December 20, 2016 12:48 PM

Answers

  • Hi,

    I Myself found the answer. To avoid getting white space . You must write like the below.

    var url="https://moss-abc/sites/xxx/Lists/abc/NewForm.aspx?isdlg=1"; 

    $("#aspnetForm").attr('action',location.pathname+"?Source="+url);

    Regards


    Remember Past Challenge Future"

    • Marked as answer by Bharath Ch Thursday, December 22, 2016 1:05 PM
    Thursday, December 22, 2016 1:05 PM

All replies

  • Hi

    ?isdlg=1 after the URL will hide the SP ribbon

    Please provide which is the URL after redirecting ( for the webpage )?

    Create your customized newForm.aspx to redirect to the correct page


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    Tuesday, December 20, 2016 1:05 PM
  • Hi Bharat,

    You need to append source keyword in url only like

    NewForm.aspx?Source=https://www.google.co.in/ it will work with isdlg=2 or without isdlg 

    If u want both combination together you need to override existing button functionality as:-

    <iframe id="wpframe"  ></iframe>
    
    <script>
        
        document.getElementById('wpframe').commitPopup = function () {
            document.getElementById('wpframe').src = '{URL}';
        };
    
    </script>

    MARK AS ANSWER IF IT HELPS!!


    Thanks Shekhar.diary

    • Proposed as answer by Huzefa Mala Thursday, December 22, 2016 9:28 AM
    Tuesday, December 20, 2016 1:09 PM
  • Thanks for reply It must redirect to the same URL what I mentioned. Instead of white space

    Remember Past Challenge Future"

    Tuesday, December 20, 2016 8:57 PM
  • Hi,

    You could try to build your URL like below:

    http://sp:12001/Lists/CheckBox/NewForm.aspx?isdlg=1&Source=http://sp:12001/Lists/CheckBox/NewForm.aspx?isdlg=1

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, December 22, 2016 8:38 AM
  • Hi,

    I Myself found the answer. To avoid getting white space . You must write like the below.

    var url="https://moss-abc/sites/xxx/Lists/abc/NewForm.aspx?isdlg=1"; 

    $("#aspnetForm").attr('action',location.pathname+"?Source="+url);

    Regards


    Remember Past Challenge Future"

    • Marked as answer by Bharath Ch Thursday, December 22, 2016 1:05 PM
    Thursday, December 22, 2016 1:05 PM