Skip to main content

Disable jquery in masterpage for a specific content page?



I have this code that warns the user about unsaved changes and it's in the MasterPage of the site I'm working on. I have a search page that doesn't allow the user to save anything and it triggers the unsaved changes warning. Is there a way to disable the code for this one content page?







var _changesMade = false;

$(document).ready(function () {



$('form').bind($.browser.msie ? 'propertychange' : 'change', function () {

_changesMade = true;

});



$(window).bind('beforeunload', function () {

if (_changesMade)

return 'There are unsaved changes which will be lost if you continue.';

});

});




Comments

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?