When function setUsernameAndPassword() starts I want to display popup window, where are two inputs (username and password). User fill these inputs, press OK and then continue function and sets var username and password. How can I do this?
function setUsernameAndPassword(){
//display popoup window with two inputs
var username = "";
var password = "";
}
<div id="login_form">
<form class="form" action="" method="post" name="login_form" id="login_form">
<p>Username <input type="text" name="username" /></p>
<p>Password <input type="password" name="pass" /></p>
<input type="submit" name="submit" value="Login" />
</form>
</div>
I look at the jquery dialog, but this is too complicated, I want something simple and without css. And also JavaScript Prompt() method is not a good solution because I need two inputs in one popup window.