Skip to content

Instantly share code, notes, and snippets.

Created July 31, 2014 15:16
Show Gist options
  • Save anonymous/0cb99e2bce7c94a1f8c0 to your computer and use it in GitHub Desktop.
Save anonymous/0cb99e2bce7c94a1f8c0 to your computer and use it in GitHub Desktop.
Created with Gistr for Brackets.iohttps://github.com/LucasKA/Gistr
<a href id="reload">clicky</a>
<script type="text/javascript">
$(document).ready(function(){
function getUsers(){
$.ajax({
type: "GET",
url:"../components/user.cfc?method=GET",
dataType: "json",
data: {
objectid: 0
},
success: function (data) {
$("##userTableBody").html("");
$.each(data,function(i,obj){
var div_data= 'obj.blah';
$(div_data).appendTo('#userTableBody');
});
}
});
}
$('#reload').click(getUsers);
});
</script>
@iconecd
Copy link

iconecd commented Jul 31, 2014

   function getUsers(){
        $.ajax({
            type: "GET",
            url:"../components/user.cfc?method=GET",
            dataType: "json",
            data: {
                objectid: 0
            },
            success: function (data) {
                $("##userTableBody").html("");
                $.each(data,function(i,obj){
                    var div_data= 'obj.blah';
                    $(div_data).appendTo('#userTableBody');
                });
            }
        });
    }

$(document).ready(function(){
    $('#reload').click(getUsers);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment