Really hoping you can help me with this, I'm needing the user to enter a unique ID into a form, I then need javascript to create an iFrame with the javascript variable the user entered and part of the src URL.
<form>
<input type="text" id="Rname" name="Rname"><br>
</form>
<button onclick="myFunction()">Start Room</button>
<iframe id="chatframe" src="" height="45%" width="80%" allow="camera; microphone" class="left">
</iframe>
<script>
function myFunction() {
var x = Rname
document.getElementById("chatframe").src =
"https://meet.jit.si/"+ x;
</script>
The code above doesn't work and im fairly certain it's due to it not being able to assign the user's input to the variable, then insert that variable into the iFrame... but I'm actually at a loss with this.
Many Thanks