Ask coding questions

← Back to all posts
Embeded code using iframe
KoalaAKALiam1

I embeded python code using an iframe, but every time I run it, it just says "replit.com refused to connect.". Any tips on why it does this?

This is my code:

<!DOCTYPE HTML><head>
</head>
Voters
KoalaAKALiam1
Comments
hotnewtop
MrVoo

Make sure your body tag is outside the head tag :>

KoalaAKALiam1

@MrVoo Thank You I didn't even see that but unfortunately it did not help

MrVoo

@KoalaAKALiam1 ruiwenge's comment should help, did you try it?

KoalaAKALiam1

@MrVoo Yes I did it embeds it but does not run the python code

MrVoo

@KoalaAKALiam1 Did you press run?

KoalaAKALiam1

@MrVoo Yes, I did

MrVoo

@KoalaAKALiam1 Which repl is this in

Coder100

Replit editor cannot be embedded due to security, if you want to embed the output, try reading this:
https://docs.replit.com/hosting/embedding-repls#embedding-a-repl-via-iframe

for you:

ruiwenge2

use this for the src attribute instead: https://replit.com/@KoalaAKALiam1/Snake-Game-Website?embed=true