vendredi 13 février 2015

SPO 2013 redirect using url parameter doesn't work

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.


Aucun commentaire:

Enregistrer un commentaire