In my webpart when I click new item I get:

enter image description here Is there a way to make this box appear to create a new list item when I link a link?

I want to have something hyperlinked like "Send Feedback" that people can click and get a callout box like this.

Let me know how to communicate my question better, Thankyou.


Use the SP.UI.ModalDialog.showModalDialog function to open a dialog like this:

function openURL(){

            url: "pageurl.aspx", 
            title: "Feedback", 
            allowMaximize: true, 
            showClose: true, 
            width: 800, 
            height: 600, 

            dialogReturnValueCallback: newCallback 
function newCallback(dialogResult, returnValue) { 


You can use this function like

<button onclick="javascript:return openURL();">Feedback</button>

You can add a javascript file using the content web part.

Edit page -> Add web part -> Media and content -> Content editor -> Add

Edit the source of the web part and add the following code into it:

<script src="/sites/subsite/list/SiteAssets/file.js" type="text/javascript"></script><script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>

Add the js file under Site Assets using SharePoint Designer.

enter image description here

|improve this answer|||||
  • Can I ask you where I find functions? If you refer me to a site that will teach me about that i can look at it. Sounds like something in Designer?Thanks – Carbon Jun 19 '15 at 20:38
  • Add a js file to your page and add the above code to it. – Keerthi Jun 19 '15 at 20:39
  • Do I add a content editor to the page to do this? I dont see in web parts where to add a js file. Very new at sharepoint. – Carbon Jun 19 '15 at 20:50
  • Did you check my updated answer? – Keerthi Jun 19 '15 at 20:51
  • Click on Assets -> Javascript from the ribbon at the top or add an external file using Import Files button. – Keerthi Jun 19 '15 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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