Random password generator with JavaScript

In JavaScript To generate password use the following function. function generatePW() { var i=0; var s=”abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_?/:(){}[]0123456789″; var pw=””; var c=(Math.random() * 3)+9; for (i=0; i<c; i++) { pw+=s.charAt(Math.random() * 72); } return(pw);} Here the JavaScript function Math.random() generates a random number from 0 to 1 (actually just less than 1). So the code: var c=(Math.random() … [Read more…]

How to make jQuery work on the same page with Mootools and or Prototype?

Recently i have faced thats problem on my project. Several of my pages use both JQuery and Protoype. Also i have used Mootools some pages. JQuery this appears to be causing problems, because both libraries define a function named ‘$’. JQuery provides a function noConflict() which relinquishes control of $ to other libraries that may … [Read more…]