So I have an external page:
http://api.aghost.net/api/futures/index.cfm?Username=E020521102&Password=ksc0rNX&service=table&style=3&layout=chart&showGrid=0&symbols=@C@3&colorLabels=0&contractFormat=2&dateFormat=short&fontsize=large&timeFormat=m&dateFormat=m
From which I'm trying to retrieve "345'4", my code however just gives me an object, when I run '.toSource' on the object I receive the following output:
({0:{}, length:1, prevObject:{0:{location:({}), icpsignup:{0:{}, 1:{}, 2:{}, 3:{}, 4:{}, 5:{}, 6:{}, 7:{}, 8:{}, 9:{}}, jQuery1710019525210189072606:2}, context:{location:({}), icpsignup:{0:{}, 1:{}, 2:{}, 3:{}, 4:{}, 5:{}, 6:{}, 7:{}, 8:{}, 9:{}}, jQuery1710019525210189072606:2}, length:1}, context:{location:({}), icpsignup:{0:{}, 1:{}, 2:{}, 3:{}, 4:{}, 5:{}, 6:{}, 7:{}, 8:{}, 9:{}}, jQuery1710019525210189072606:2}, selector:"div.month.left span.big"})
What am I doing wrong? I feel like I'm close to a solution, but there's something I'm missing..
Below is my code:
var data = 'http://api.aghost.net/api/futures/index.cfm?Username=E020521102&Password=ksc0rNX&service=table&style=3&layout=chart&showGrid=0&symbols=@C@3&colorLabels=0&contractFormat=2&dateFormat=short&fontsize=large&timeFormat=m&dateFormat=m';
var $row1 = jQuery("div.month.left span.big"), $row2 = jQuery("#cpuloaddynamic"), $row3 = jQuery("#meminfodynamic");
$.get("index.html", function(data){
var $data=$(data);
$row1.html( $data.find('tbody > tr:first-of-type > td:nth-of-type(5)').html() );
});
alert($row1.toSource());
I got my start from the following post: jquery: load values from external html and populate many local <div> fields, with one read of the html
Here's my edited code:
var data = 'http://api.aghost.net/api/futures/index.cfm?Username=E020521102&Password=ksc0rNX&service=table&style=3&layout=chart&showGrid=0&symbols=@C@3&colorLabels=0&contractFormat=2&dateFormat=short&fontsize=large&timeFormat=m&dateFormat=m';
var $row1 = jQuery("div.month.left span.big"), $row2 = jQuery("#cpuloaddynamic"), $row3 = jQuery("#meminfodynamic");
$.get(data, function(data){
var $data=$(data);
$row1.html( $data.find('tbody > tr:first-of-type > td:nth-of-type(5)').html() );
alert( $data.find('tbody > tr:first-of-type > td:nth-of-type(5)').html() );
});