December 3, 2013

What is Knockout JS?

Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user’s actions or when an external data source changes), KO can help you implement it more simply and maintainably.
Headline features:
  • Elegant dependency tracking - automatically updates the right parts of your UI whenever your data model changes.
  • Declarative bindings - a simple and obvious way to connect parts of your UI to your data model. You can construct a complex dynamic UIs easily using arbitrarily nested binding contexts.
  • Trivially extensible - implement custom behaviors as new declarative bindings for easy reuse in just a few lines of code.

Additional benefits:
  • Pure JavaScript library - works with any server or client-side technology
  • Can be added on top of your existing web application without requiring major architectural changes
  • Compact - around 13kb after gzipping
  • Works on any mainstream browser (IE 6+, Firefox 2+, Chrome, Safari, others)
  • Comprehensive suite of specifications (developed BDD-style) means its correct functioning can easily be verified on new browsers and platforms

For more visit knockoutjs.com/ 

Sencha Touch, Build for Mobile

Sencha Touch bunch is the industry’s first HTML 5 product suite that provides phone developers with the JavaScript framework, development tools, and business class support they need to build fully touch based apps in a single, integrated package.

 Modern HTML5 App Dev for the Desktop

Sencha Ext JS is the industry's most powerful desktop application development platform with unparalleled cross-browser compatibility, advanced MVC architecture, plugin-free charting, and modern UI widgets.

What is Sencha Ext. JS?

Sencha Ext. JS is the leading standard for business-grade web application development. With over 100 examples, 1000 APIs, hundreds of components, a full documentation suite and built in themes, Ext JS provides the tools necessary to build robust desktop applications. Ext JS also brings a rich data package that allows developers to use a model-view-controller (MVC) architecture when building their app. The MVC leverages features like Big Data Grids enabling an entirely new level of interactivity in web apps.

Cross Browser Compatibility

Ext JS 4 lets developers deliver on an incredible variety of browsers and on more operating systems using the same code — over ten years of browsers in one release. On modern browsers, Ext JS 4 utilizes HTML5 features and falls back to alternatives on older browsers. Whether you’re using Ext JS’ built-in UI components, using the Charting package, or theming your application, Ext JS 4 makes it easy to build an app that gives you the power of the web regardless of what browser your customer uses.
Ext JS supports all major web browsers including:

Internet Explorer 6+
Firefox 3.6+ (PC, Mac)
Safari 4+
Chrome 10+
Opera 11+ (PC, Mac)


August 1, 2013

Custom HTML Select Box

Add Jquery and call this id on your select box id="Items" in your page than call this script:========

jQuery.fn.extend({
    selectbox: function(options) {
        return this.each(function() {
            new jQuery.SelectBox(this, options);
        });
    }
});


/* For ie logging */
if (!window.console) {
    var console = {
        log: function(msg) {
     }
    }
}
/* */

jQuery.SelectBox = function(selectobj, options) {
   
    var opt = options || {};
    opt.inputClass = opt.inputClass || "selectbox";
    opt.containerClass = opt.containerClass || "selectbox-wrapper";
    opt.hoverClass = opt.hoverClass || "current";
    opt.currentClass = opt.selectedClass || "selected"
    opt.debug = opt.debug || false;
   
    var elm_id = selectobj.id;
    var active = -1;
    var inFocus = false;
    var hasfocus = 0;
    //jquery object for select element
    var $select = $(selectobj);
    // jquery container object
    var $container = setupContainer(opt);
    //jquery input object
    var $input = setupInput(opt);
    // hide select and append newly created elements
    $select.hide().before($input).before($container);
   
   
    init();
   
    $input
    .click(function(){
    if (!inFocus) {
          $container.toggle();
        }
    })
    .focus(function(){
       if ($container.not(':visible')) {
           inFocus = true;
           $container.show();
       }
    })
    .keydown(function(event) {      
        switch(event.keyCode) {
            case 38: // up
                event.preventDefault();
                moveSelect(-1);
                break;
            case 40: // down
                event.preventDefault();
                moveSelect(1);
                break;
            //case 9:  // tab
            case 13: // return
                event.preventDefault(); // seems not working in mac !
                $('li.'+opt.hoverClass).trigger('click');
                break;
            case 27: //escape
              hideMe();
              break;
        }
    })
    .blur(function() {
        if ($container.is(':visible') && hasfocus > 0 ) {
            if(opt.debug) console.log('container visible and has focus')
        } else {
            hideMe();   
        }
    });


    function hideMe() {
        hasfocus = 0;
        $container.hide();
    }
   
    function init() {
        $container.append(getSelectOptions($input.attr('id'))).hide();
        var width = $input.css('width');
        $container.width(width);
    }
   
    function setupContainer(options) {
        var container = document.createElement("div");
        $container = $(container);
        $container.attr('id', elm_id+'_container');
        $container.addClass(options.containerClass);
       
        return $container;
    }
   
    function setupInput(options) {
        var input = document.createElement("input");
        var $input = $(input);
        $input.attr("id", elm_id+"_input");
        $input.attr("type", "text");
        $input.addClass(options.inputClass);
        $input.attr("autocomplete", "off");
        $input.attr("readonly", "readonly");
        $input.attr("tabIndex", $select.attr("tabindex")); // "I" capital is important for ie
       
        return $input;   
    }
   
    function moveSelect(step) {
        var lis = $("li", $container);
        if (!lis) return;

        active += step;

        if (active < 0) {
            active = 0;
        } else if (active >= lis.size()) {
            active = lis.size() - 1;
        }

        lis.removeClass(opt.hoverClass);

        $(lis[active]).addClass(opt.hoverClass);
    }
   
    function setCurrent() {   
        var li = $("li."+opt.currentClass, $container).get(0);
        var ar = (''+li.id).split('_');
        var el = ar[ar.length-1];
        $select.val(el);
        $input.val($(li).html());
        return true;
    }
   
    // select value
    function getCurrentSelected() {
        return $select.val();
    }
   
    // input value
    function getCurrentValue() {
        return $input.val();
    }
   
    function getSelectOptions(parentid) {
        var select_options = new Array();
        var ul = document.createElement('ul');
        $select.children('option').each(function() {
            var li = document.createElement('li');
            li.setAttribute('id', parentid + '_' + $(this).val());
            li.innerHTML = $(this).html();
            if ($(this).is(':selected')) {
                $input.val($(this).html());
                $(li).addClass(opt.currentClass);
            }
            ul.appendChild(li);
            $(li)
            .mouseover(function(event) {
                hasfocus = 1;
                if (opt.debug) console.log('over on : '+this.id);
                jQuery(event.target, $container).addClass(opt.hoverClass);
            })
            .mouseout(function(event) {
                hasfocus = -1;
                if (opt.debug) console.log('out on : '+this.id);
                jQuery(event.target, $container).removeClass(opt.hoverClass);
            })
            .click(function(event) {
              var fl = $('li.'+opt.hoverClass, $container).get(0);
                if (opt.debug) console.log('click on :'+this.id);
                $('li.'+opt.currentClass).removeClass(opt.currentClass);
                $(this).addClass(opt.currentClass);
                setCurrent();
                hideMe();
            });
        });
        return ul;
    }
   
};

July 24, 2013

Google Vs Yahoo

  1. Google Alerts (beta):Google Alerts are email updates of the latest relevant Google results (web, news, etc.) based on your choice of query or topic.
    Yahoo! Alerts Get real-time updates delivered to you instantly via: email, mobile device, or Yahoo! Messenger.
  2. Answers:
    Google Answers Google Answers is a way to get that help from Researchers with expertise in online searching.
    Ask Yahoo! We carefully research our answers by searching the Internet for relevant web sites and pages.
  3. Desktop Search:Google Desktop Find your email, files, media, web history and chats instantly.
    Yahoo! Desktop Search (beta) Yahoo! Desktop Search Beta is a free, downloadable search application that enables you to find any of your files, emails, attachments, instant messages and contacts.
  4. Directory:
    Google Directory The Google Web Directory integrates Google's sophisticated search technology with Open Directory pages to create the most useful tool for finding information on the web.
    Yahoo! Directory The Yahoo! Directory gives you access to what's available on the Web.
  5. Finance:
    Google Search Feature: Stocks To use Google to get live stock quotes and information, just enter one or more ticker symbols.
    Yahoo! Finance You have access to a wide array of financial resources on Yahoo!
  6. Groups:
    Google Groups (beta) A Google Group is an online discussion group or mailing list that helps groups of people communicate using email and the web.
    Yahoo! Groups Yahoo! Groups is a free service that allows you to bring together family, friends, and associates through a web site and email group.
  7. Image Search:
    Google Image Search Google's Image Search is the most comprehensive on the Web, with more than one billion images indexed and available for viewing.
    Yahoo! Image Search Yahoo! Image Search allows you to search millions of images from across the Web.

May 21, 2013

CSS 3 Features in ie (Rounded corners, Gradients)

Here is the solution for using features of CSS3 in ie versions:
By this you can:

1. Rounded corners in ie (6,7,8,9)
2. Gradients in ie (6,7,8,9)
etc.

PIE makes Internet Explorer 6-9 capable of rendering several of the most useful CSS3 decoration features.
http://css3pie.com/

December 27, 2012

Some Big Myths About SEO:

Metatag Descriptions Help Your Rankings==
Not anymore: in fact, metatags are no longer even indexed by Google and Bing. But don't ignore them altogether: Your metatags form the text that is displayed along with your link in the search results--and a more compelling description will compel more users to click on your listing instead of on others.

The More Inbound Links, the Better==
False. In all the recent updates to Google's algorithm, the search giant has made it a core priority to have quality trump quantity. Gone are the days of having thousands of superlow-quality links driving up rankings; in fact, creating those links can look spammy and get your site penalized.

Websites must be submitted to search engines==
In 2001, yes, this was the case--indeed, this was the first service that my company, Wpromote, ever provided. But in 2012? Not at all. At this point, if there is any connection from any site to yours, your site will be quickly discovered by Google.

Note that being indexed is a far cry from achieving high rankings--but that initial step of submission is no longer needed or helpful.