Our site, keeping you up-to-date news.

 

Add Validation to Contact Form

December 17, 2010 at 1:21 pm | Blog | 2 comments

 

A PengbosInspiration theme user asked for validation on contact form, especially for the email field. It should be a very common request for developers using contact form. I made a little change to the javascript codes.

the original javascript code for submitting a contact form is as follow:

var theme_template_dir = jQuery("meta[name=theme_template_dir]").attr('content');
jQuery(document).ready(function(){
        jQuery('<div></div>')
        .insertBefore('#log')
            .attr('id','log_wait')
            .css('display','none')
            .addClass('ajax-loading')
            .ajaxStart(function(){jQuery(this).show();})
            .ajaxStop(function(){jQuery(this).hide();});
 
        jQuery('#contacts').submit(function() {
            jQuery.post(theme_template_dir + '/include/gmail_sendmail.php',jQuery(this).serialize(), function(data){
            jQuery('#log').empty();
            jQuery('<div></div>')
            .attr('id','log_res')
            .appendTo('#log')
            .html(data);
        });
        return false;
    });
});

(more…)

 

10+1 Essential Firefox Add-ons for Web Developers

December 4, 2010 at 5:33 am | Blog | No comment

 

Firefox is the most popular web browser on the world wide web. Especially for the web designers, they can not even live without it. Firefox is much more helpful when it is equipped with some powerful add-ons. I am gonna recommend 10 plus 1 the most useful add-ons which will make designers and developers’ life easier and work more efficient.


Firebug

Firebug is the most widely-used add-on for web developers. Developers can edit, debug, and monitor CSS, HTML, and JavaScript live in any web pages. I can not imagine debuging javascript without it. And what’s more, Firebug Lite is compatible with all major browsers: IE6+, Firefox, Opera, Safari and Chrome. What a powerful tool!


(more…)