I'm trying to create a popup after a user successfully sells a stock. I want it to look like Chrome's confirm form resubmission popup
I'm pretty sure I need javascript, html, and css, but I'm not sure how to do it.
Thanks,
David
I'm trying to create a popup after a user successfully sells a stock. I want it to look like Chrome's confirm form resubmission popup
I'm pretty sure I need javascript, html, and css, but I'm not sure how to do it.
Thanks,
David
If you want to use the popup window for any browser you probably want to use javascript. The popup window you have above is called a confirmation box. Here is how to use it:
function foo() {
confirm("Message to be displayed");
}
The above function should be inside a <script>
tag.
Then on your <input>
tag with type="submit"
also define the onclick
attribute like that:
<input type="submit" value="submit" onclick="return foo();" />
You can learn more here: http://www.w3schools.com/js/js_popup.asp