Popup Message in ASP page, if click okay, update access db.

Hey guys,
I don't know if it is possible or not, but I was hoping to have a user click on a link and a popup message appears, giving them the options "Yes" or "Cancel".  If they click "Yes", then I can update my access db via sql.  I don't care if clicking yes causes the page to redirect to a page that will run the sql code.

Hopefully this makes sense!

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Well, in "plain" javascript, you can only get OK, Cancel:

<a href="thePagetoGo.html" onclick="return confirm('Are you sure you want to continue?') ";>Save</a>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big MontyWeb Ninja at largeCommented:
you would need a custom dialog box, the easiest solution would be to use jQuery:

            function showDialog( title, msg ) {
                $("<div>" + msg + "</div>").dialog({
                    buttons: { "Yes": function() { submitForm() } },
                    close: function(ev, ui) { $(this).remove(); },
                    hide: "drop",
                    modal: true,
                    title: title,
                    overlay: { backgroundColor: "#000", opacity: 0.5 }

            function submitForm() {
                 // code to submit form to server to save to db, either by normal submit functionality or via ajax

the above code is just a basic function I sometime use for quick modal dialog boxes. Here are 2 links, one with info on modal dialogs and another that explains ajax:


Hope this helps!
Slim81Author Commented:
Thanks!  Super easy and answered my question.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.