I have a button on a page that brings up the modal newform for a Questions and Answers list.
var options=SP.UI.$create_DialogOptions();options.url='https://server/sites/collection/subsite/Lists/Questions Answers/NewForm.aspx?IsDlg=1';options.height = 400;void(SP.UI.ModalDialog.showModalDialog(options));
This works great...except it is on a template site. We need the url to be relative or possibly dynamically update when a new template is created (thinking way outside my box here)?
I've tried /lists, ../../lists, etc....and I am sure I am missing something as A) it is not working...and B) in my mind there is nothing linking it to the list???
Your expertise and time is GREATLY appreciated!~