I have a button on my page. When clicked a popup box should appear allowing the user to enter text. When OK/Submit is pressed, my jscript will then perform some functions usin
Paste this code inside your head tags between script tags
HTML
JS
window.onload=function()
{
var el=document.getElementById('button');
el.onclick=function(){
var my_text=prompt('Enter text here');
if(my_text) alert(my_text); // for example I've made an alert
}
}