I have this function within Javascript;
function newripple() {
var api = new ripple.RippleAPI();
var account = api.generateAddress();
document.getElementById("address").value = account.address;
document.getElementById("secret").value = account.secret;
}
What I would like to do is instead of assigning these values to input fields I would like to display them on the page as JSON.
My index page is very simple;
<h2>Ripple Wallet Generator</h2>
<p><b>Ripple Address</b></p>
<input readonly="readonly" id="address" style="width: 300px;">
<p><b>Ripple Secret</b></p>
<input readonly="readonly" id="secret" style="width: 300px;">
I am not very familiar with JavaScript I very much appreciate any help.
The desired result when i load the page would be something like ;
{"address":"VALUE","secret":"VALUE"}