Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Messi.ask() #51

Open
perthsystem opened this issue Jul 7, 2014 · 1 comment
Open

How to use Messi.ask() #51

perthsystem opened this issue Jul 7, 2014 · 1 comment

Comments

@perthsystem
Copy link

Hi,

I have

setup to display when user clicks on a link eg.:
a href="javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'" title="This week's video">Current Video</a

This works well, however I would like to use Messi.ask() to ask the user to confirm to continue. 'Yes' would display the div id="light" class="white_content" and 'No' would not.

Is this possible?

Many thanks :)

@kgust
Copy link

kgust commented Jul 9, 2014

If I understand this correctly, you can do something like this:

Messi.ask(
    'Would you like to continue?',
    function(value) {
        if (value == 'Y') {
            document.getElementById('light').style.display='block';
        }
    }
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants