function delayTAbFocus(target) {
         //hach for ie7'keydown', function(e) {
            var keyCode = e.keyCode || e.which;

            if (keyCode == 9) {
               var ind = target.attr("tabindex") + 1;
                for (var i = ind; i < 100; i++) {
                    var nextTarget = $('input[tabindex=' + ind + ']');
                    if (nextTarget != null &&':visible') &&':enabled')) {
                        setTimeout(function() { $('input[tabindex=' + ind + ']').focus(); }, 100);


My solution is when Tab keydown, focus the current form1 again, then find the next tabindex.
in this code, I have set all tabindex in no interval sequence..

Categories: JQuery

1. add data-bind attribution to your dropdown

     @Html.DropDownListFor(m => m.SelectCafeBuildVersion, Model.AutoDaploymentData.CafeBuildVersions, "", 
 { @class = "", @data_bind = "options: cafeBuildVersions,optionsText: 'Text',optionsValue:'Value'" })       
Notce here is "@data_bind", it will change to "data-bind" in the HTML automatictly.

2. in the ajax Call get json object from backend, and add a a viewmode:

                type: "post",
                url: "MyController/RefreshModelData",
                success: function (model) {                   
                 var   viewModel = {
                        cafeBuildVersions: ko.observableArray(model.AutoDaploymentData.CafeBuildVersions)
                error: function (v) {
                    alert("data error!");

That's it..

if not in can get the modeldata from model do it in the View:
var modelData = @Html.Raw(Json.Encode(Model));
<script type="text/javascript">
    var initialData = <%= new JavaScriptSerializer().Serialize(Model) %>;

Categories: JQuery | MVC
RGraph is a HTML5 charts library that uses the HTML5 canvas tag to draw and supports over twenty different types of charts. Using the new HTML5 canvas tag, RGraph creates these charts inside the web browser using JavaScript, meaning quicker pages and less web server load. This leads to smaller page sizes, lower costs and faster websites.

Categories: Html5