I'm trying to create a prompt that has a time delay, the value that is written in the prompt is then used in other areas of the form. I have written some javascript coding but I believe there is a minor thing that i am doing wrong as currently the prompt and delay are working, but because the setTimeout function is being used, that is what is being displayed in the form, instead of the content of the prompt. This is my Javascript?
var name = setTimeout(function(){ prompt("What is your name?", "Type your full name here")},750);
document.write("Document Written By: " + name + " (" + day + "/" + month + "/" + year + ") ")