Friday, 4 May 2012

Open an Infopath form template with Modal Dialog


<b><a onclick="javascript:openDialog();return false;" href="#" target="_self">

<span style="font-size: 12pt">Test Link</span></a> </b>

<script type="text/javascript">

function openDialog() 
{
 var options = {
      url: 'FormServerTemplates/MYINFOPATHURL',
      title: "Test",
      dialogReturnValueCallback: function (dialogResult) 
      {
                        SP.UI.ModalDialog.RefreshPage(dialogResult);
            if(dialogResult==1){     
                         }
      },
      allowMaximize:false
 };
 SP.UI.ModalDialog.showModalDialog(options);
} </script>







Infopath tutorial: http://msdn.microsoft.com/en-us/library/cc162745(v=office.12).aspx
Deploy infopath: http://msdn.microsoft.com/en-us/library/ms772110(v=office.12).aspx

No comments:

Post a Comment