Using jQuery to prevent Internet Explorer from accidentally submitting form on enter key

$(function () {
    //page is ready
	
	
		//Prevents users from accidentally submitting form with enter key (e.g. IE problem) 
	    //http://stackoverflow.com/questions/895171/prevent-users-from-submitting-form-by-hitting-enter
	    $(document).on("keyup keypress", "form input[type='text']", function (e) {
	        if (e.keyCode === 13 /*enterkey*/ || event.keyCode === 169 /*enter on numpad*/) {
	            e.preventDefault();
	            return false;
	        }
	    });
	
});

Works in ajax templated context as well.

Javascript Parser extension – function list and lint

Ever wanted a simple overview of your javascript functions in Visual Studio 2013? This extension fixes that.

Especially useful if you use namespacing a lot and wants a simple navigation inside the js file.

Its also a “linter” which tells you about faulty js code.

Untitled

 

You can tweak the settings in Visual Studio options:

Screenshot - 2015-04-27 , 09_01_06

Javascript Parser extension.