-
Copy the core.js file from its default location at %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS\1033, place it in the same folder, and rename as customcore.js file.
-
Make the necessary changes in the customcore.js file by removing unwanted ECB menu items.
-
To create the custom master page, make a copy of the default.master page and rename it as custom.master.
-
In the custom master page, add the following line to render the customcore.js file:
<SharePoint:ScriptLink language="javascript" name="core.js" Defer="true" runat="server"/><SharePoint:ScriptLink language="javascript" name="customcore.js" Defer="true" runat="server"/>
-
Save the custom.master page and upload it to the master pages gallery of the site. Then apply the custom.master page as the default master page for the site.
15.11.11
Hiding Menu Item
31.10.11
Redirect on Created Item : Rescue the new ID
jquery is the solution
var LIST_question = '{xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}';
var ServerAddress = 'http://xxx/';
function submitQuestion()
{
var title = new String($("#title").val());
var t = new String($("#question").val());
t=t.trim();
if(t=="")
return;
title=title.trim();
if(title=="")
return;
var lists = new SPAPI_Lists(ServerAddress) ;
//
var newItem = { Title : title, BodyCopy : t};
var items = lists.quickAddListItem(LIST_question, newItem);
var id=-1;
if (items.status == 200)
{
var rows = items.responseXML.getElementsByTagName('z:row');
if(rows.length ==1)
{
var r = rows[0];
var id = r.getAttribute('ows_ID');
window.location.href='DispForm.aspx?ID='+id;
}
else
{
alert("Error: No row added");
}
}
else
{
alert('There was an error: ' + items.statusText);
return;
}
}