Using same solution proposed here: Confirmation Page / Custom List

Url is included in a function that generates newpost.aspx in a pop up. It worked once but then stopped which is weird.

function showPopup() { var options = { 
url: 'https://xxxxx/Lists/Posts/NewPost.aspx?Source=https://xxxx/thankyou.aspx',
title: 'Submit A Recipe', 
allowMaximize: true, 
showClose: true, 
width: 625, 
height: 850
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options); }; 

Called with:

<a href="javascript:showPopup()" class="btn btn-success">Submit</a> </div>

UPDATE: Using an inline javascript it DOES work. The difference appears to be that the function approach adds "IsDlg=1" to the url of the pop up, whereas the inline method does not: Function: newpost.aspx?Source=redirectpage.aspx&IsDlg=1 Inline: newpost.aspx?Source=redirectpage.aspx I want to use the function because it fires the "dlg" box which looks better than a bland new window.

  • I see you are using SP.SOD.execute(), is the Scriptlink for jQuery OnDemand parameter set to true? Feb 13, 2015 at 16:18
  • Ransher-I don't know - how would I find out? Clearly sp.ui.dialog.js is not loading so I guess not. When I use the trick outlined here it works: sharepoint.stackexchange.com/questions/53559/…
    – matt
    Feb 17, 2015 at 19:47
  • On the link you provided the Sharepoint:Scriptlink has a property OnDemand="false", that was what I was asking, whether it is set to true or false for you Feb 17, 2015 at 21:40
  • Using Office 365 flavor of SPO 2013, can I make that change? If so, where? In Sharepoint Designer?
    – matt
    Feb 18, 2015 at 2:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.