Google+

Saturday, July 30, 2011

Dynamically create a accordion by java script and jquery


Suppose , you have to dynamically get 10 accordion or any number of accordion , there are mainly two solution : whether you create a all accordion by manually or you create that accordion dynamically .



First all create a div with any id , i create a div with accordion id .


            <div id="accordion">
            </div>

   
 Second add script to generate dynamically accordion .


   <script type="text/javascript">

        $(document).ready(function () {     
            BindEnvironments();
        });


 function BindEnvironments() {

            var text = $("#accordion");
            for (var i = 0; i < 10; i++) {
                var content = '<h5><a href="#" id="hf' + i + '" >' + i + '</a></h5>';
                content += '<div id="dv' + i + '">AAA</div> ';
                $("#accordion").append(content);
            }
            $("#accordion").accordion({
                collapsible: false,
                autoHeight: false,
                active: -1
            });
        }

</script>



Note:-Please comment and reply me.

Sunday, July 24, 2011

How the OTM helps the company ?

First question that are present in my mind, "How the OTM helps the customers?"

   OTM is a global transportation platform that helps companies to optimize and automate all the transportation function :-

  1. Ordering
  2. Shipment
  3. Planning
  4. Execution
  5. Scheduling
  6. Sourcing
  7. In doing so, reduce the transportation cost , optimization ,
  8. It help them to improve the process efficiency 
  9. It help them to better visibility in customer service by managing delivery 
  10. It help them to expand global basic .




Note:-Please comment and reply me.

Thursday, July 21, 2011

OTM - Introduction


OTM is a oracle transportation management system which track your shipping status , reduces the cost of transportation , by which you can get

status how much your shipment is paid or how much your shipment is delayed at a time.

OTM is a well defined GUI based transportation management system. It contain help section tell about all issues regrading how to navigate OTM.

It contain following basic components :-


  1. Currency Section
  2. Rate Section
  3. International Rate
  4. TimeZone Section
  5. Schedule Section
  6. Order Management Section
  7. Airport Section
  8. Port Section
  9. Distance Time Section



OTM is very strong optimization engine . When you go to plan a shipment there are lot of stuff work in background :-

  1. Finding Rates
  2. Finding Airport available to pick up load .
  3. Finding Resources available to move shipment source to destination within deadline
  4. How much transportation cost .
  5. How much time is required to complete shipment.





Note:-Please comment and reply me.

Tuesday, July 19, 2011

Creating an Oracle Standby Database



Note:-Please comment and reply me.

Saturday, July 9, 2011

Android 1 Programming Tutorial install SDK, Eclipse plugin and Hello wor...



Note:-Please comment and reply me.

Friday, July 8, 2011

Alternating Color in Jquery Template

First of all create a div containing table for jquery template header and body.



 <div >
                <div style="width: 580px;">
                    <table id="tblListofItems">
                        <thead>
                            <tr>
                                <th align="left">
                                    Item Detail<span style="float: right;"></span>
                                </th>
                                <th align="left">
                                    Item Price<span style="float: right;"></span>
                                </th>
                                <th align="left">
                                    Action
                                </th>
                            </tr>
                        </thead>
                        <tbody id="listofItems">
                        </tbody>
                    </table>
                </div>


Second create jquery template for each row.


  <script id="ItemTemplate" type="text/x-jquery-tmpl">  
        <tr class="${oddOrEven()}">
            <td>
                  <B> ${Name} </B>
                   <br />
                   ${Description}
                  <br />
                   Type: ${Type}
                  <br />
                  <br />
            </td>          
            <td style="text-align:center;">
                ${Rate}
            </td>              
        </tr>
    </script>


Thrid create web service to bind all jquery template.


   $(document).ready(function () {    
                GetAllItems(Id);            
        });

   function oddOrEven() {
            return ($.inArray(this.data, items) % 2) ? "jqueryGridEvenRow" : "jqueryGridOddRow";
        }



.jqueryGridOddRow
{
    border-bottom: 1px solid #C2C2C2;
    border-top: 1px solid #C2C2C2;
    background-color: #ffffff;
    color: #000000;
    text-align: left;
    font-family: Verdana;
    font-size: 12px; /*background-color: #F0F0F6;*/
}
.jqueryGridEvenRow
{
    border-bottom: 1px solid #C2C2C2;
    border-top: 1px solid #C2C2C2;
    background-color: #E9F8F8;
    color: #022e41;
    text-align: left;
    font-family: Verdana;
    font-size: 12px;
    margin-left: 3px;
}





   function GetItemByIdSucceeded(result) {      
         var  items = result.d;
            $("#listofItems").empty();
            $('#ItemTemplate').tmpl(items).appendTo('#listofItems');
            $("#listofItems tbody tr").addClass("delete");
            $("#listofItems").trigger("update");
            $("#listofItems").trigger("appendCache");
            $("#listofItems tbody tr.delete").remove();
            $("#listofItems").trigger("update");
            return;
        }

        function GetItemByIdFailed(result) {      

        }

        function GetAllItems() {        
            $.ajax({
                url: "../WebServices/ItemService.asmx/GetAllItem",
                data: JSON.stringify({ }), // parameter map
                type: "POST", // data has to be POSTED              
                contentType: "application/json",
                dataType: "json",
                success: GetItemByIdSucceeded,
                error: GetItemByIdFailed
            });
        }









Note:-Please comment and reply me.