Sharepoint - Passing parameters in URL to NewForm.aspx
Posted
by kevin
on Stack Overflow
See other posts from Stack Overflow
or by kevin
Published on 2009-10-02T21:26:53Z
Indexed on
2010/03/22
20:31 UTC
Read the original article
Hit count: 1172
sharepoint
|JavaScript
Any suggestions would be great. I've inherited a system and have been requested to add a context menu item to allow the ability to add a new item. I've set up the context menu with the new option and the newform.aspx to accept and pull parameters from the url for populating some fields. The context menu was created with the content editor web part and the follow JavaScript.
function Custom_AddDocLibMenuItems(m, ctx)
{
var strAction = "window.location='http://address?para1=....'";
var strDisplayText = "Taxonomy";
var strImagePath = "";
// Add our new menu item
CAMOpt(m, strDisplayText, strAction, strImagePath);
// add a separator to the menu
CAMSep(m);
// false means that the standard menu items should also be rendered
return false;
}
I'm having difficulties getting the proper values in order to concatenate them to the strAction string (which would be the full url of the newform.aspx. Any suggestions on how I retrieve the values of the columns for the item that the user right click to get context menu.
© Stack Overflow or respective owner