开发者

Can I reset variable declared in core.js file using CEWP?

开发者 https://www.devze.com 2023-02-11 15:05 出处:网络
Can I declare variable in Core.Js file and assign value on any SharePoint page. Like putting CEWP on page and setting variable(residing in Core.js file) value dynamially?

Can I declare variable in Core.Js file and assign value on any SharePoint page. Like putting CEWP on page and setting variable(residing in Core.js file) value dynamially?

I tried putting one variable in Core.js file, and in CEWP I reset value to x, but I am not getting x value in any function inside Core.js file. Let me know if this could happen, if ye开发者_如何学JAVAs than how?

Thanks,

Ashish Chotalia


Refer to Customize or Override core.js file functions in Sharepoint @ YoursAndMyIdeas


My understanding is that if you modify core.js, you are in an unsupported state, so i cannot recommend you do that.

http://blogs.msdn.com/b/sowmyancs/archive/2008/04/02/customization-of-core-js-file-in-sharepoint.aspx

Could you explain what you are trying to do and there is probably a better way.

UPDATE

Do you know that AddDocLibMenuItems already has a hook in it, to allow it to be overridden

function AddDocLibMenuItems(m, ctx)
{
    if (typeof(Custom_AddDocLibMenuItems) !="undefined")
    {
        if (Custom_AddDocLibMenuItems(m, ctx))
            return;
    }

If you defined a function Custom_AddDocLibMenuItems, you should be able to work without customising core.js

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号