I am stuck with a problem and thought that maybe one of you can help me with it.

I have a autohosted Sharepoint App. The app consists of several aspx pages. What I want to do is that one of the pages is the Main page and there are buttons for the other pages. If the user clicks on one of them, the according aspx opens in a modal dialog. So the users nevery really leaves the Main page.

I tried it using this script:

 $.getScript(scriptbase + 'SP.Runtime.js',
       function () {
           $.getScript(scriptbase + 'SP.js',
               function () { $.getScript(scriptbase + 'SP.RequestExecutor.js', Showdialog); }

function Showdialog() {

    var options = {
        url: "/_layouts/15/InDialog.aspx",
        tite: 'Sharing  Information',
        allowMaximize: false,
        showClose: true,
        width: 430,
        height: 230

    SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
    return false;

But all i get is a SOD is undefined exception when i execute this code.

What am I missing?

thanks in advance

best regards


1 Answer 1


On the Autohosted app you haven't the standard SharePoint libs because it's hosted on Azure. So you haven't any SOD or js files that usually you can use with a SharePoint hosted app

That means that you have to create your modal dialog window

  • Aha ok, makes sense thought. So I have to create a modal dialog with for example JQuery and display my page in it...? best regards
    – AdelPoint
    Apr 7, 2014 at 10:53
  • yes. You can use some libs to do that, like jquery.ui Apr 7, 2014 at 10:54

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.