I have this code for a website im trying to make and it is supposed to interact with another replit website ive made that returns json for my js script to get. The problem is that when it tries to interact with the other replit website, nothing happens. It’s like the script completely stops when it tries to access the other website. What do I do?
Repl link:
async function randomTwitterLike() {
console.log("button press detected");
await fetch("https://the-krisnard-api.sirloinsteak1.repl.co/api/random_twit_like").then(response => {
return response.json();
}).then(data => {
console.log(data);
var html = `<iframe src="${url}" name="testing image" width="800" height="1600"></iframe>`;
document.getElementById('picturearea').innerHTML = html;
document.getElementById('output').innerHTML = 'enjoy'
console.log(document.getElementById('picturearea').innerHTML);
})
}