I am trying to visualize dataset in my local cartodb as a table in my browser, but when i tried with the following code am getting the below error
var table = document.getElementById('mytable');var sql = cartodb.SQL({ user: 'documentation' });sql.execute("select adm0name, name from ne_10m_populated_places_simple_1 limit 10").done(function(data) {data.rows.map(function(r) {var row = document.createElement('tr');var nameCell = document.createElement('td');nameCell.innerText = r.name;row.appendChild(nameCell);table.appendChild(row);});})
And my error is No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8383' is therefore not allowed access
Is there any other way to view my dataset as a table in browser simpler than this?
Help would be appreciated.
أكثر...
var table = document.getElementById('mytable');var sql = cartodb.SQL({ user: 'documentation' });sql.execute("select adm0name, name from ne_10m_populated_places_simple_1 limit 10").done(function(data) {data.rows.map(function(r) {var row = document.createElement('tr');var nameCell = document.createElement('td');nameCell.innerText = r.name;row.appendChild(nameCell);table.appendChild(row);});})
And my error is No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8383' is therefore not allowed access
Is there any other way to view my dataset as a table in browser simpler than this?
Help would be appreciated.
أكثر...