Random Custom Serial Number Generator

A brief example on how to generate random serial numbers with JavaScript. Enjoy! // Symbols Array (A-Z, 0-9) var Symbols = new Array(); // Gets the ascii code for a certain character function GetAsciiBySymbol(letter) { var code = letter.charCodeAt(0); return code; } // Populates a certain array with the A-Z, 0-9 symbols function PopulateArray(array) {… Continue reading Random Custom Serial Number Generator

Published
Categorized as JavaScript

Replace Chars in String – prototype example

An elegant way to replace certain chars from a string with new ones: // Custom method for replacing certain chars from a string with new onesfunction ReplaceChars(oldValue,newValue) { var newText = this.split(oldValue); newText = newText.join(newValue); return newText;} // Attach the custom method to string objectString.prototype.Replace = ReplaceChars; // Usagevar myString = “Hello World!”;alert(myString.Replace(“o”,”0″)); // will… Continue reading Replace Chars in String – prototype example

Published
Categorized as JavaScript

Nofollow – free

Blogger by default, and other blogging software such as WordPress, automatically adds the “nofollow” microformat extension to all links from user generated content. User generated content is defined as comments or external sources such as linkbacks and trackbacks. I support the people of the blogging community who have chosen to remove NoFollow for blog comments… Continue reading Nofollow – free

Generating tooltips on certain events

A tooltip is a small box of explanatory text (usually on yellow background) that appears when the mouse pointer is held over a button or other interface element.In Microsoft Dynamics CRM we can define constraints (masks) on certain fields. It is desired that the user is well informed about the text’s format, in real time,… Continue reading Generating tooltips on certain events

Using the “onkeyup” event

Let’s add some interactivity to our customizations 🙂 For example, we have 4 fields: Amount (Schema Name amount, Type float(2)), Discount(Schema Name discount, Type float(2)), Tax (Schema Name tax, Type float(2)) and Total Amount (Schema Name totalamount, Type float(2)) and wewant to calculate in real time the Total Amount based on the Amount, Discount and… Continue reading Using the “onkeyup” event

Published
Categorized as JavaScript

Coloring Activities (Tutorial)

Activities are central when working with sales in Microsoft CRM. Whether you need to contact a customer, send a quote, or run a campaign, it is all about activities in Microsoft Dynamics CRM. Downloading and reading this tutorial you will learn, step by step, a simple interface method of coloring activities in Microsoft Dynamics CRM… Continue reading Coloring Activities (Tutorial)

Events in JavaScript

Events are the beating heart of any JavaScript application. Without events there are no scripts. Take a look at any web page with JavaScript in it: in nearly all cases there will be an event that triggers the script. The reason is very simple. JavaScript is meant to add interactivity to your pages: the user… Continue reading Events in JavaScript

Published
Categorized as JavaScript