Generally we includes an external css ( Cascading Style Sheets ) and js ( javascript ) files in the HEAD section of our HTML page. We include them by following conventional method - <link rel="stylesheet" type="text/css" href="stylesheet/mycss.css"/> <script language="javascript" src="javascript/myjs.js" type="text/javascript"></script> This method added files to the page as they encountered in page source code or synchronously. Here we [...]
Continue reading...2. August 2010
Today I am sharing number to text convert script that simply input number and produce its wordy counterparts. It is the most simple script and easy to implement in the project. Example : Suppose you want to make ‘ 12345 ‘ read like ‘ twelve thousand three hundred forty five ‘ , Enter your number in text [...]
Continue reading...28. May 2010
In the previous post you have read about basic javascript validations. Here I am posting some complex javascript validations like validation to restrict user to enter “only characters”, “only number”, “char and num both” and email validation. Here demo contains some basic fields for validation. <form method="post" name="myform" onsubmit="return validate()"> First Name: <input type="text" name="fname" id="fname"> Phone: <input [...]
Continue reading...28. May 2010
Simple Javascript validation on form element. It is demo on one element of the form. You need to create simple form like below with one form element and one submit button. <form method="post" name="user_regform" onSubmit="return check_validity();"> <input type="text" name="fname"/><br> <input type="submit" name="Submit" value="Save" /> </form> You will call a java script function (check_validity()) on submit of the form. It simply [...]
Continue reading...27. May 2010
How to select value of dropdown with button? This can be accomplish with the simple function I wrote few days ago. Lets start, you need to make a HTML form with a select box and a simple button. On this button you need to call a JavaScript function. In this js function you simply [...]
Continue reading...
4. November 2010
0 Comments