My Thoughts & Views

Archive for the ‘Javascript’ Category

The below code might help you with validation of certain HTML tags entered in a TextArea. (Click image to enlarge).

The below code might help you with validation of certain HTML tags entered in a TextArea. (Click image to enlarge).

Time Spending on Browser Compatibility Fixing

Posted by: intelbot on: October 19, 2008

Displaying "Last updated" date on websites

Posted by: intelbot on: December 27, 2007

Use this javascript code to display “Last Updated” date. document.write(“Last Updated on:”) ;document.write(document.lastmodified) ;

Javascript KeyCode Reference table for Event Handling

Posted by: intelbot on: September 3, 2007

The post explains Keyboard event handling using javascript.Javascript events are used to capture user keystrokes. Below is a table of key codes for the keys on a multimedia keyboard. If this table is inconsistent with your own findings, please let me know. Java Script Code to Find Key code <script language=”JavaScript”>document.onkeydown = checkKeycodefunction checkKeycode(e) {var [...]

IsNumeric Javascript Validation for Numerals

Posted by: intelbot on: June 16, 2007

Inside u r Head Tag in HTML Page u insert the following code function IsNumeric(strString) // check for valid numeric strings { var strValidChars = “0123456789.-”; var strChar; var blnResult = true; if (strString.length == 0) return false; // test strString consists of valid characters listed above for (i = 0; i < strString.length && [...]

Adding Click to Select All Text: Javascript

Posted by: intelbot on: April 17, 2007

If you want your users to click on a text area and automatically highlight all of the text, there is a very simple way to do it. This does not require external javascript at all. It’s no “copy code” button, but if the user clicks inside the text area, this bitt of code will hightlight [...]


Follow

Get every new post delivered to your Inbox.