Skip to main content

Posts

HTML 5 Form Validations

HTML 5 has introduced Javascript plug-ins to achieve something similar effect. But these code will only work in Safari 5, Chrome 6, Opera 9, Firefox 4 Beta and the iPhone/iPad. Also each browser has a slightly different default behaviour. The "required " attribute The simplest change you can make to your forms is to mark a text input field as 'required':

Different versions of HTML

HTML is an evolving language, and each new version is given a number. The first definitive version was HTML 2.0 -- this had most of the elements we know and love, but was missing some of the Netscape/Microsoft extensions, and did not support tables, or ALIGN attributes. HTML 3 (late 1995) was an ambitious effort on the part of Dave Raggett to upgrade the features and utility of HTML. However, it was never completed or implemented, although many features were integrated in the next "official" version of HTML, known as HTML 3.2.

Javascript for Loop

The for loop is the most compact form of looping and includes the following three important parts: The loop initialization where we initialize our counter to a starting value. The initialization statement is executed before the loop begins.  The test statement which will test if the given condition is true or not. If condition is true then code given inside the loop will be executed otherwise loop will come out.  The iteration statement where you can increase or decrease your counter.

Javascript While Loop

While programming, there might be situation that you need to execute a block of code for a given number of times, in these situation while loop can be used. The while loop executes code while a condition is true. Syntax: while (expression){    Statement(s) to be executed if expression is true }   Example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Siple Javascript conditions</title> </head> <body> <button onclick="myLoop()">Click Me</button> <script> function myLoop() { var count=0; while(count <=10) { document.write("Number: "+count+"<br/>");    count ++; } } </script> </body> </html>

Download XAMPP

XAMPP is a very easy to install Apache Distribution for Linux, Solaris, Windows and Mac OS X. The package includes the Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin. Download XAMPP from below locations: Download From Sourceforge Download From CNET Download From DownloadXamp

Encapsulation in PHP

Encapsulation is wrapping some data in an object. It is about controlling the visibility of things and define something like the order of layers of our application. Encapsulation in PHP OOP is about control and limit which parts of our application can access some class methods and properties using three keywords called in OOP world Access Control Modifiers , and these keywords are : public , private , protected   and this keyword comes in the beginning of declaring method or property just like below : class Member {   public $id;   protected $username;   private $password; } Public keyword modifier is used to define a variable or function as being visible to everyone, everywhere.  When this modifier is used the variable or function following is visible to the users using your class as well as all the inner workings of your class.  This modifier is the only modifier that allows interaction outside of the class. Private keyword modifier is use...