Tuesday, September 17, 2013

Navigation Link Modal Popup – Add new item with JavaScript

It's cumbersome for user to add new item in a list, which grown huge, he/she need to scroll all the way to get the "+ Add new item" Option and not only that, the user need to navigate to that specific list in order to perform this task.

And I know you all going to say, hey, how about add that as a navigation link. Well, adding the navigation link just give you a quicker way to launch the list but not the "add new item" option. And as you know adding any JavaScript in navigation will fail with below error!

clip_image001

Fix:

Navigate to the quick launch http://<server/site>/_layouts/quiklnch.aspx

Add new like with web address as

"javascript:OpenPopUpPage('<listname>/NewForm.aspx?RootFolder=&IsDlg=1');"

clip_image002