Javascript to check file size to be uploaded

November 11th, 2011
HTML Code: <input type="file" name="file" id="file" /> Javascript Code: var node = document.getElementById('file'); var check = node.files[0].fileSize; if (check > 5000000) { $('#file_msg').html('Please upload an image of less than 5 MB size'); return false; } Read More

How to create a contact form in HTML

July 27th, 2011

HTML

Below is the HTML code of the contact form
<form action="contact.php" method="post"> Your name<input type="text" name="cf_name"> Your e-mail <input type="text" name="cf_email"> Message<textarea name="cf_message"> <input type="submit" value="Send"> <input type="reset" value="Clear"> </form>

PHP

Now for the contact.php file that will actually grab the data from the fields, compose into a message and send to your email. . Below is the code of the file with comments to its major sections. Assigning the data sent from the contact form fields (cf_name, cf_email, cf_message)… Read More

Image Resizing Made Easy with PHP

July 27th, 2011

Step 1:

In your working directory create two files: one called index.php, the other resize-class.php

Step 2:

Open your index.php file and add the following code.

As you can see, there is a nice logic to what we’re doing. We open the image file, we set the dimensions we want to resize the image to, and the type of resize. Then we save the image, choosing the image format we want and the image quality. Save and close your index.php file.

Read More

How to expand collapse (toggle) div layer using jQuery

July 26th, 2011

Step 1:

Include jQuery Library in head section of your html file.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 

Step 2:

Come up with your own… Read More

adding ‘first’ and ‘last’ class to Joomla Menu items : Menu overrides

July 2nd, 2011
one often needs to define the first and last element in navigation menu. It is needed when you want to remove the last/first unwanted border or maybe if you want to highlight the first item differently. The effect can be achieved by adding an extra class “first” and “last” to the respective child elements of the menus. It is a much sought after feature and I feel should be made the default feature of joomla menu system. Joomla has a mod_mainmenu module for creating menus. Joomla allows the users to create overrides to get this special enhancements. We would make an override to joomla’s ‘mod_mainmenu’ module to get out classification… Read More

CSS Transparency for All Browsers

July 1st, 2011
Transparency is one of those CSS properties that has a weird history and requires lots of different properties and values to ensure cross browser compatibility that goes back as far as you can. To cover all your bases, you need a bunch of CSS statements. Fortunately they don't interfere with each other, so using them all every time you wish to add transparency is no big hassle and worry-free. Here they are, and are currently set to 50% transparency: .transparent { /* Required for IE 5, 6, 7 */ /* ...or something to trigger hasLayout, like zoom: 1; */ width: 100%; /* Theoretically for IE 8 & 9 (more valid) */ /* ...but not required as filter works… Read More

3-day workout routine

June 28th, 2011
Usually, training programs are designed to be completed within a seven-day cycle -- meaning you'll train seven days a week. One of the benefits of this easy three-day workout routine is that it can be scheduled on any given day of the week, depending on your availability and the days you feel like going to the gym. Even though you can choose which days to go to the gym, it is recommended that you leave at least one day of rest between each workout. Here is the suggested combination for your easy three-day workout routine. * Day 1 - Chest, back, abdominal muscles, and cardiovascular exercises (30 minutes) * Day 2 - Day off * Day 3 - Shoulders,… Read More

Send email using the PHP mail() function

June 27th, 2011
Description How to send an email from within a PHP page using the built in mail() function. The code [fb-like-button] Read More

IE6 Min-height Hack

June 26th, 2011
eg1: Now that IE7 recognizes the min-height but so many people are still using IE6, how do we make sure that IE6 “gets” min-height without hacking? First you use this AT THE END OF your stylesheet: html, body { height: 100%; min-height: 100%; } Then you follow it with whatever div you wish to also be full height. div#mainwrapper { height: 100%; min-height: 100%; } Because IE6 doesn’t understand min-height it instead reads and uses height, while all other browsers will follow the cascade and use min-height instead. This allows us to get IE6 in line without conditionals or hacks, and yet feed all browsers exactly what they… Read More

World cup from 19th Feb

January 16th, 2011
 Read More
created By ooyes.net