Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-git2.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<input type = 'hidden' value = 'id1,id2,id3' id = 'fieldGroupReferences'/>
</body>
</html>
 
function GetSQLTable() {
        var str = $("#fieldGroupReferences")[0].value;
        var res = str.split(",");
        $("#LoadingImage").show();
        $("#LoadingImage2").show();
        for (var i = 0; i < res.length; i++) {
                alert(res[i]);
                (function(i,res) {
                  console.log('value1'+i);
                    setTimeout(function () {
                      console.log('value2'+i);
                       // alert(res[i]);
                        
                    }, 0);
                })(i,res);
            }
    }
GetSQLTable();
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
wishypro
0viewers