Friday, July 10, 2015

Disable autocomplete in Chrome

Originally when I was given the task to disable autocomplete. I thought it would be no problem, but that was far from reality. I tried adding autocomplete="off" to the input tag but it continued to show in chrome. Although, it did seemed OK in IE and Firefox. After a few hours of frustration. I decided to use "false" as the value instead of "off" which resolved the issue. Below is a snippet of the working code. 


//Use this for IE
autocomplete="off"

//Use this for Chrome
autocomplete="false"


//Form Example
// You can also add it to the form so you won't need to add it individually.
<form id="form1">
<input id="txtName" type="text" autocomplete="false" />
<input id="txtEmail" type="text" autocomplete="false" />
<input id="btnSubmit" type="button" value="Submit" />
</form>

Change SA password in MSSQL 2008

USE Master
GO
ALTER LOGIN sa WITH PASSWORD = 'Set New Password'
GO
ALTER LOGIN sa WITH
      CHECK_POLICY = OFF,
      CHECK_EXPIRATION = OFF;


Handling Multiple JQuery Versions

Although I don't recommend it. If you've ever need to use multiple JQuery versions, then I hope this helps. I recently worked on a project that needed to use multiple JQuery plugins.


 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
 <script type="text/javascript" src="Scripts/simpleZoom.js"></script> 
<script type="text/javascript"> //Create new variable and set it to now conflict. var jQuery_1_9_1 = $.noConflict(true); //Now, anytime you use this version, you'll need to use this variable. $(function () { jQuery_1_9_1('#show').simpleZoom({ zoomBox: "#zoom", markSize: [120, 169], zoomSize: [240, 338], zoomImg: [480, 677] }); }); </script>