Html/css J query Javascript

CK Editor and Angular js

CK EDITOR AND ANGULAR JS Easy way to implement ck editor with angular js. CKEditor is a ready-for-use HTML text editor designed to simplify web content creation. It’s a WYSIWYG editor that brings common word processor features directly to your web pages. AngularJS is a structural framework for dynamic web apps. It lets you useContinue Reading “CK Editor and Angular js”


Google Map with Multiple Markers

Google Map with Multiple Markers Place the below script in head tag <script type=”text/javascript” src=””> </script> Place The below Code in body tag <div id=”map” style=”width: 500px; height: 400px;”></div> <script type=”text/javascript”>// <![CDATA[ var locations = [ [‘Bondi Beach’, -33.890542, 151.274856, 4], [‘Coogee Beach’, -33.923036, 151.259052, 5], [‘Cronulla Beach’, -34.028249, 151.157507, 3], [‘Manly Beach’, -33.80010128657071, 151.28747820854187,Continue Reading “Google Map with Multiple Markers”


Clock In javascript

Add belowe script in head tag <script type=”text/javascript” language=”JavaScript”>// <![CDATA[ var dayarray=new Array (“Sunday”,”Monday”,”Tuesday”,”Wednesday”, “Thursday”,”Friday”,”Saturday”) var montharray=new Array(“January”,”February”,”March”,”April”,”May”,”June”, “July”,”August”,”September”,”October”,”November”,”December”) function getthedate(){ var mydate=new Date() var year=mydate.getYear() if (year < 1000) year+=1900 var day=mydate.getDay() var month=mydate.getMonth() var daym=mydate.getDate() if (daym<10) daym=”0″+daym var hours=mydate.getHours() var minutes=mydate.getMinutes() var seconds=mydate.getSeconds() var dn=”” if (hours>=12) dn=”” if (hours>12){ hours=hours-12 }Continue Reading “Clock In javascript”


JavaScript to disable button after click

<script language=”javascript” type=”text/javascript”> function disableButton(sender,group) { Page_ClientValidate(group); if (Page_IsValid) { sender.disabled = “disabled”; __doPostBack(, ”); } } </script> and in Html <div> Enter Name :- <asp:TextBox ID=”TextBox1″ runat=”server”></asp:TextBox> <asp:RequiredFieldValidator ID=”RequiredFieldValidator1″ runat=”server” ControlToValidate=”TextBox1″ ErrorMessage=”RequiredFieldValidator”>*</asp:RequiredFieldValidator><br /> <asp:Button runat=”server” ID=”btnSave” Text=”Save” OnClick=”Save” OnClientClick=”disableButton(this,”)” UseSubmitBehavior=”false” /> </div> If there is Validation Group it will be like this :- AddContinue Reading “JavaScript to disable button after click”


Script to detect IE version

<script type=”text/javascript”> if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x; var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number if (ieversion < 7) { alert(“You’re using older version of ie appgarde to ie8 or above ie8”); location.href(‘’); } } else document.write(“n/a”) </script>


Javascript to find X ,Y position of cursor

window.onload = init; function init() { if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; } function getCursorXY(e) { document.getElementById(‘cursorX’).value = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); document.getElementById(‘cursorY’).value = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); }