View Full Version : UI Modal needed...

11-02-2012, 05:09 AM
What I have is a simply contact form, and when the user hits 'Submit', it needs to pop up with a window asking if the user agrees to disclaimer before the form is sent.
I know very little about JS, and I've tried searching around the web to find some type of UI Modal (I want to be able to customize the style of it to match the website's theme), but all I can find is a UI Modal that allows you to confirm something, but then just shows the results 'you confirmed it!', or along those lines.

So basically, something like this:
User fills out form, clicks Submit.
Pop up: "Do you agree to the *blah blah blah*?
if I AGREE - finish submitting the form
if CANCEL - close pop up window

If you'd like to look at the contact form, click here (http://mcgehee.ace-onecomputers.com) and scroll down to it.

Philip M
11-02-2012, 09:39 AM
<form onsubmit = "return agreeterms()">

Content of form

<input type = "submit" value = "Submit The Form">

<script type = "text/javascript">

function agreeterms() {
var c = window.confirm ("Confirm that you have read and agree to the terms and conditions");
if (c) {return true}
else {
alert ("You must agree the accept the terms and conditions before you can submit the form");
return false;



You can of course create your own modal dialog box using jQuery if you wish.

Quizmaster: Who is married to the Duke of Edinburgh?
Contestant: Kate Winslet.