Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
</style>
</head>
<body>
  <div>
    Buses:
    <input type="text" id = "Eid" name="Employee_NTID" />
    <br />
    <br />
    <input type="button" onclick="testCAll()" value = "Search"/
    <div id="rawResponse"></div>
    <hr />
    <div id="response"></div>
    </div>
</body>
</html>
 
function testCAll() {
    //var ntid = $('#Eid').val(); 
    $.ajax({
        type: "GET",
        url: "http://54.187.220.194:3000/buses/suggests/",
        //data: "{'ntid':'stephen.gilroy1'}",       //working
        data: { ntid: $('#Eid').val()},
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(result) {
            console.log(result.d);
            resultData = eval("(" + result.d + ")");
            //$("#rawResponse").html(result.d);
        },
        error: function(result) {
            alert("jQuery Error:" + result.statusText);
        }
    });
}
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers