Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 342337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:47:39+00:00 2026-05-12T10:47:39+00:00

I have a link to a page which invokes the ‘Sexy Alert Box’ script

  • 0

I have a link to a page which invokes the ‘Sexy Alert Box’ script to pop a message asking if users agree to Terms and Conditions with options “I Agree” and “Cancel”.

I’ve got that much going but now I need for the “I Agree” option to send them to a new page. (“Cancel” returns the user the current page.)

Something to do with document.location.href?

I am using the mootools framework.

Sexy Alert Box 1.2 mootools & jQuery

Here’s the code:

<a href="#" 
    onclick="Sexy.confirm('Do you agree to the terms and conditions?', {
        textBoxBtnOk: 'I Agree', // goes to www.newpage.com
        textBoxBtnCancel: 'Cancel' // return to current page    
    });">Link</a>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:47:39+00:00Added an answer on May 12, 2026 at 10:47 am

    The standard, built-in javascript confirm function will return true or false, depending on the button pushed (this is a synchronous action), but this Sexy.confirm plugin looks like something that is going to return its choice via callback functions (it will be an asynchronous action).

    For example,

    function doConfirm() {
        Sexy.confirm('Do you agree to the terms and conditions?', {
            textBoxBtnOk: 'I Agree',
            textBoxBtnCancel: 'Cancel',
            onComplete: function(returnvalue) {
                // here is where you act, after user has made a choice...
                if (returnvalue) {
                    //alert ("pressed OK");
                    window.location.href = '/page1/';
                }
                else {
                    //alert("pressed Cancel");
                    window.location.href = '/page2/';
                }
            }
        });
        return false; // this is to cancel the native click event
    }
    

    And then you can make your link tags a little nicer,

    <a href="#" onclick="return doConfirm();">Link</a>
    

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a link on the page which when clicked opens up a thick-box
I have a link which goes to the default edit page. http://127.0.0.1:3000/calendars/16/edit I want
I have a page with a Print link that takes the user to a
I have a master page, with a help link in the top menu. This
Here's my scenario: I have a page containing several links; each link is meant
I have a link that I dynamically create which looks something like the following:
I have a link in a pdf-document (PDF1), which is embedded in a browser
I have this page which loads quotes. It has a search form wherein if
I have a page which has a couple option links that set GET-based parameters
i have a default.aspx page which contains a iframe, whose source is set to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.