Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8681683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:34:28+00:00 2026-06-12T21:34:28+00:00

I’m a bit stuck on a problem which I can’t solve, I performed investigation

  • 0

I’m a bit stuck on a problem which I can’t solve, I performed investigation on internet and on this site, but I can’t find the answer to my question.

So basically I have a javascript file, which I cannot modify, so I have another javascript file which should catch the method when it is called and override it.

Normally I know how it works and I already done the function overriding, but I don’t know how to solve this issue.

I have a very big script, but I will show just a small piece of it:

Microsoft.Office.Server.Ajax.NavResizer.prototype = {
    $6: null,
    $7: null,
......
$20:function ($p0) {
    if (this.$1E) {
        $p0.preventDefault();
    } 
},
$21: function ($p0) {
    var $0 = $p0.target;
    this.$1F = ($0 === this.$A);
    if (this.$1F || $0 === this.$B) {
        this.$1E = $0;
        this.$18 = $p0.clientX;
        this.$19 = $p0.clientY;
        Sys.UI.DomEvent.removeHandler(this.$1E, 'mousedown', this.$12);
        var $1 = document.body; Sys.UI.DomEvent.addHandler($1, 'mouseup', this.$13);
        Sys.UI.DomEvent.addHandler($1, 'mousemove', this.$14);
        $1.style.cursor = (this.$1F) ? 'e-resize' : 'n-resize';
        this.$1A = this.get_$42();
        this.$1B = this.get_$43();
        $1.focus();
        Sys.UI.DomEvent.addHandler($1, 'selectstart', this.$15);
        $p0.preventDefault();
    } 
},
$22: function ($p0) {
    this.$34($p0);
    var $0 = document.body;
    Sys.UI.DomEvent.removeHandler($0, 'mouseup', this.$13);
    Sys.UI.DomEvent.removeHandler($0, 'mousemove', this.$14);
    Sys.UI.DomEvent.addHandler($0, 'selectstart', this.$15); 
    $0.style.cursor = 'default';
    Sys.UI.DomEvent.addHandler(this.$1E, 'mousedown', this.$12);
    this.$1E = null;
},
$23: function ($p0) {
    this.$34($p0);
},
$24: function ($p0) {
    this.$26();
},
....

Basically this is the part of the script: so lets say I want to override function: $22: function ($p0) in the script in another javascript file, how do i do that?

I would appreciate any help.

A small update, some good examples were provided but they are not working.
The environment where i run this sript is SharePoint, normally when I did override I used this method:

var oldFixRibbonAndWorkspaceDimensions = window.FixRibbonAndWorkspaceDimensions;
window.FixRibbonAndWorkspaceDimensions = function () {
    this.MyFixRibbonAndWorkspaceDimensions();
};

function MyFixRibbonAndWorkspaceDimensions(){...}

And it didn’t matter when i load the script as this function was only called when the default function was called not before not after. Just in the same time. But with the example which were provided here, the function is trying to execute on the document.ready()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:34:30+00:00Added an answer on June 12, 2026 at 9:34 pm

    You want to permanently override it? Just do this:

    Microsoft.Office.Server.Ajax.NavResizer.prototype.$22 = function($p0) {
        // your code.
    };
    

    As long as your script is executed after the original is defined, you’re good.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.