title: sharepoint custom action creation , navigation to url, adding java script
body: <p><img src="https://i.stack.imgur.com/bUi7r.png" alt="custom action"></p>
  
  <p>here is a img of a custom action i created on a list in sharepoint  2010 , but my problem is that what i want is that the page whwew i am redirection openes as a pop up.
  i puted that code :</p>
  
  <pre><code>&gt; &lt;script type="text/javascript"&gt;  //Dialog opening 
  &gt; function OpenDialog() {   var options = SP.UI.$create_DialogOptions();
  &gt;   options.url = "/_layouts/OUR_Project/ModalPromptPage.aspx";
  &gt;   options.width = 500;    options.height = 400;
  &gt;   options.dialogReturnValueCallback = Function.createDelegate(null,
  &gt; CloseCallback);   SP.UI.ModalDialog.showModalDialog(options); }
  </code></pre>
  
  <p>in the master page where i am opening that lias as webpart...
  then in the navigation i am trying to call that page with the java script function that allow me to pop the page up, as:
  javascript:opendialog();
  or even javascript: sp.ui.showmoduldialog()...and alla that kinds of code , and still not working.
  what is the wrong thing i am doing or that is missing to make it work.
  is it in the where to place the java script code or the way calling the function or wherer.Thank sfor the help</p>