Question by Waldema
In HTML it would look like this:
<p>How many piece of gift are you willing to reserve?</p> <form action="action.php" method="post"> <input type="text" name="giftammount" /> </form>
And when confirm returns true it will submit the answer and action.php will do the magic for MySQL table.
So, is this even possible technically? Not that i’ve tried, i’ve spent several hours wondering this but can’t figure this out.
Answer by codeM0nK3Y
If you’re using jQuery UI then the dialog widget could be just what you need:
Use a modal dialog to require that the user enter data during a multi-step process. Embed form markup in the content area, set the modal option to true, and specify primary and secondary user actions with the buttons option.
Take a look at the jQuery UI page for an example and basic code
Answer by Starx
One way you can solve this, is creating a modal box and simulating a confirm box + confirm dialog effect.
Few other functions like
prompt() only take text but not HTML