Sunday, August 10, 2014

jQuery Bootgrid Plugin example

jQuery Bootgrid Plugin

jQuery Bootgrid Plugin
jQuery Bootgrid is a UI component written for jQuery and Bootstrap (Bootstrap isn’t necessarily required).A grid control especially designed for bootstrap.
Everything you need to start quickly is:
  1. Include jQuery, jQuery Bootgrid and Bootstrap libraries in your HTML code.
  2. Define your table layout and your data columns by adding the data-column-id attribute.
  3. Then select the previously defined table element represents your data table and initialize the bootgrid plugin.
  4. Specify your data url used to fill your data table.

Wholly : jQuery plugin to highlight Table Rows and Columns

Wholly : jQuery plugin to highlight Table Rows and Columns
A jQuery plugin to highlight table rows and columns on hover with rowspan and colspan support.

Bootstrap Table with jQuery

Bootstrap Table with jQuery
The table displays data in a tabular format and offers rich support to radio, checkbox, sort, pagination and so on. The table has been designed to reduce development time and to require no specific knowledge from developers. It is both featherweight and feature-rich.
Features:
  • Created for Bootstrap 3 (Bootstrap 2 supported)
  • Responsive web design
  • Scrollable Table with fixed headers
  • Fully configurable
  • Via data attributes
  • Show/Hide columns
  • Show/Hide headers
  • Get data in JSON format using AJAX
  • Simple column sorting with a click
  • Format column
  • Single or multiple row selection
  • Powerful pagination
  • Card view
  • Localization

Saturday, August 9, 2014

Jquery grid example using csv file

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link href="styles/kendo.common.min.css" rel="stylesheet" />
    <link href="styles/kendo.default.min.css" rel="stylesheet" />
    <link href="styles/kendo.dataviz.min.css" rel="stylesheet" />
    <link href="styles/kendo.dataviz.default.min.css" rel="stylesheet" />
    <script src="js/jquery.min.js"></script>
    <script src="js/angular.min.js"></script>
    <script src="js/kendo.all.min.js"></script>
</head>
<body>
    
        <div id="example">
            <div id="grid"></div>

            <script>
                $(document).ready(function () {
                    $("#grid").kendoGrid({
                        dataSource: {
                            type: "odata",
                            transport: {
                                read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
                            },
                            pageSize: 20
                        },
                        height: 550,
                        groupable: true,
                        sortable: true,
                        pageable: {
                            refresh: true,
                            pageSizes: true,
                            buttonCount: 5
                        },
                        columns: [{
                            field: "ContactName",
                            title: "Contact Name",
                            width: 200
                        }, {
                            field: "ContactTitle",
                            title: "Contact Title"
                        }, {
                            field: "CompanyName",
                            title: "Company Name"
                        }, {
                            field: "Country",
                            width: 150
                        }]
                    });
                });
            </script>
        </div>


</body>
</html>

Thursday, June 5, 2014

How to search column name in all database table in oracle?

 How to search column name in all database table  in oracle?

SELECT * FROM ALL_TAB_COLUMNS
WHERE COLUMN_NAME LIKE
'%COLUMN_NAME%'

Friday, May 23, 2014

how to assign value one multiple select option to another multiple select option and remove using javascript



This may help you below Example:

 one select option value click to assign other select option.

 
<select name="avail_func" id="avail_func" size="5" style="width: 240px" multiple="multiple" >
<option value="65">Ac (American)</option>
<option value="40">AD (Infrastructures)</option>
<option value="71">Ae (Natural)</option>
</select>
<a href="javascript:void(0);" onclick="addFunc();">Add</a>
<a href="javascript:void(0);" onclick="delFunc();">Remove</a>
<select name="function_id[]" id="function_id" size="5" multiple="multiple" style="width: 240px" >
<option value="0">select one server</option>
</select>

<script>
function delFunc() {
                                var elm = document.getElementById('function_id');
                                while (elm.selectedIndex > -1) elm.options.remove(elm.selectedIndex);
                }
function addFunc() {
                                var elm1 = document.getElementById('avail_func');
                                var elm2 = document.getElementById('function_id');
                for (x=0;x<elm1.options.length;x++)
                 {
                  if(elm1.options[x].selected)
                     {


                           if (elm1.selectedIndex > -1)
                           {
                                   var new_id = elm1.options[x].value;
                                   var new_name =elm1.options[x].text;
                                   var alreadythere = false;
                                   for (i=0; i<elm2.options.length; i++)
                                        if (elm2.options[i].value == new_id)alreadythere = true;
                                        if (! alreadythere) elm2.add(new Option(new_name, new_id));

                            }

                     }
              }
                }

</script>

Sunday, April 27, 2014

How do I get album pictures using facebook API?

 
  1. From the first call you get all the albums (and the album IDs) '/me/albums'
  2. from there you can get the album picture (cover) '/'+album.id+'/picture'
  3. AND the photos of the album '/'+album.id+'/photos'
 
 
 FB.api("/"+albumid+"/photos",function(response){
    var photos = response["data"];
    document.getElementById("photos_header").innerHTML = "Photos("+photos.length+")";
    for(var v=0;v<photos.length;v++) {
        var image_arr = photos[v]["images"];

        var subImages_text1 = "Photo "+(v+1);

        //this is for the small picture that comes in the second column
        var subImages_text2 = '<img src="'+image_arr[(image_arr.length-1)]["source"]+'" />';

        //this is for the third column, which holds the links other size versions of a picture
        var subImages_text3 = "";

        //gets all the different sizes available for a given image
        for(var j = 0 ;j<image_arr.length;j++) {
            subImages_text3 += '<a target="_blank" href="'+image_arr[j]["source"]+'">Photo('+image_arr[j]["width"]+"X"+image_arr[j]["height"]+')</a><br/>';
        }
        addNewRow(subImages_text1,subImages_text2,subImages_text3);
    }
});