Angular js, javascript

Comments Off on angular js directive for decimal number

angular js directive for decimal number

Here you find a directive for angular js. input will be a valid decimal number. It will prompt your for spaces too.   app.directive(’validNumberdecimal’, function () { return { require: ‘ngModel’, link: function (scope, el, attrs, ngModel) { el.bind(’change’, function () { scope.$apply(function () { ngModel.$setViewValue(el.val()); ngModel.$render();   var number = el[0].value;   var re […]

Porting JQuery RC4 encryption to c# .Net 3.5

Recently I had a task that involved unencrypting an encrypted query string that had been encrypted on the front end using JQuery’s RC4 encryption located in file: JQuery.rc4.js. I needed to un-encrypt the encrypted string in the c# code-behind: Below is a line for line port of the JQuery.rc4.js. library functions I needed. I made […]

Why onfocusout event is not firing in firefox

Why onfocusout event is not firing in firefox I was using onfcousout event of text box to fire some javascript those were firing in IE but were not firing in Firefox. Then  I found that onblur is firing on both Internet Explorer. So do not use onfocusout event instead use onblur. Tested on I.E 7.0 […]

How to disable Asp.net Button with Jquery?

How to disable Asp.net Button with JQuery? Following java script function disables an asp.net button. Tested in IE 7 <asp:Button ID=”Button1″ runat=”server”  Text=”Disable me” OnClientClick=”disAbleMe()” /> function disAbleMe() { $(“#<%=Button1.ClientID %>”).attr(“disabled”,”true”); } You can try other attributes too.

Json, Jquery, $.ajax(), asp.net and c# to get ajaxed data table rows passing multiple parameters

Json, Jquery, $.ajax(), asp.net and c# to get ajaxed data table rows passing multiple parameters I got a request from my client that before creating user they want to see the list of existing users with the like first name and last name. I didn’t want to use asp.net ajax update panel and full post […]

Printing contents of a div using javascript

Guys this is a nice piece of code which has been tested in IE7 to print the contents of a div. I got this code from http://www.webdeveloper.com/forum/showthread.php?t=152798 While printing keep in mind that on the printed copy you will lose all css styles. <script type="text/javascript"><!– function ClickHereToPrint(){ try{ var oIframe = document.getElementById(’ifrmPrint’); var oContent = […]

Getting ASP.NET Radiobutton list Text using javascript not JQuery

I came accross a problem while I was trying to Get ASP.NET Radiobutton list Text using JQuery. I used the JQuery method $(‘#<%=RadioButtonList1.ClientID%>’).val(); but it was not returning selected value though same works for asp.net Dropdown list then I started searching over the internet but didn’t find any solution. After searching for an hour I […]

javascript

Comments Off on disable submit button on Asp.net using Javascript when user clicks it

disable submit button on Asp.net using Javascript when user clicks it

  How to disable Submit  button in Asp.net.  Following script will disable the submit button when you click on it so user can not click it again and again. Register following javascript on page load event on which your submit button is. btnSave.ClientID is the button you want to disable when user clicks on it. […]

Asp.net, javascript, programming

Comments Off on Disabling/Enabling asp.net checkboxlist items using javascritp

Disabling/Enabling asp.net checkboxlist items using javascritp

We  are using  asp.net check box server side control in ajax update panel. These are bind to SQS server.  We were facing a big problem. There were some busineess rule which were implementing on Post back i.e. on selection of check box from list other check box were getting disabled. We wrote some server side script […]

Modal Popup Extender, AJAX Tool Kit, Validation Controls ASP.NET

I am using Modal popup Extender in my project which after click save button appears and takes Reason for doing that action as an input. I am using a text box labelling Reason for change; if that box is empty I am telling my transaction to roll back. So to make changes appear in database […]