examples/browser/monitor/script.js
function showTransactions(height) {
	// Set the block height in modal title
	$('#txsHeight').html(height);
	// Get the transactions for that block
	var txs = transactions[height];
	// Reset the modal body
	$('#txs').html('');
	// Loop transactions
	for(var i = 0; i < txs.length; i++) {
		// Add stringified transaction object to the modal body
		$('#txs').append('<pre>'+JSON.stringify(txs[i])+'</pre>');
    }
    // Open modal
	$('#myModal').modal('show');
}
function showTransactions(height) {
	// Set the block height in modal title
	$('#txsHeight').html(height);
	// Get the transactions for that block
	var txs = transactions[height];
	// Reset the modal body
	$('#txs').html('');
	// Loop transactions
	for(var i = 0; i < txs.length; i++) {
		// Add stringified transaction object to the modal body
		$('#txs').append('<pre>'+JSON.stringify(txs[i])+'</pre>');
    }
    // Open modal
	$('#myModal').modal('show');
}
function showTransactions ( height ) { // Set the block height in modal title $ ( '#txsHeight' ) . html ( height ) ; // Get the transactions for that block var txs = transactions [ height ] ; // Reset the modal body $ ( '#txs' ) . html ( '' ) ; // Loop transactions for ( var i = 0 ; i < txs . length ; i ++ ) { // Add stringified transaction object to the modal body $ ( '#txs' ) . append ( '<pre>' + JSON . stringify ( txs [ i ] ) + '</pre>' ) ; } // Open modal $ ( '#myModal' ) . modal ( 'show' ) ; }
Function to open modal and set transaction data into it
Function to open modal and set transaction data into it