Works correctly in local environment, but not on server...

Works correctly in local environment, but not on server...

Ok, here's the issue. I have code that resembles this:

  1. $("a").click(function (event) {
  2. if (self.isLocked() == true) {
  3. event.stopImmediatePropagation();
  4. alert("This record has been locked by another user.");
  5. }
  6. });

The code basically checks to see if a lock has been placed on the current page, and if it has, it basically makes the page read only, by disabling hyperlink clicks.

Well, it works beautifully in Visual Studio when executed locally in Chrome.

The problem comes when I pull up the page from the server. It executes the click, AND gives me the alert. The hyperlinks are basically "tabs" on the page (not my design decision).

What should happen, though, is that I should only get an alert.

So what could be the issue?