Code

Discussion on jQuery MsgBox

Discussion on jQuery MsgBox

Cart 1,634 sales

aeroalquimia does not currently provide support for this item.

196 comments found.

Hello.

I am using jquery-1.4.2.min.js. You are using in your demo another version. So I can not see messageBox and I have errors :

this.esqueleto.msgbox.queue is not a function

Please advice !

I’m using jQuery 1.4.2 :S . Can you please email me and send the link of your page?

Hello,

As some few suggestions:

1. Add a feature to define a custom icon of the message.

2. Add Textarea Support. This could be used for contact form for exemple.

3. Feature to show the messagebox without icon.

Regards

Hi,

I have put a login form in the msgbox like in your example but I would like to know if I can add a maxlenght on the 2 textfields ?

Thanks

Hi there,

I bought your script but I need help to make it functionnal with my form.

I have a form with 3 differents buttons and when one of these button are clicked, it will post the form and execute some php code but I would like to know how I can put your jquery msgbox and execute the right php code (it must enter the right if condition) depending on which button the user has clicked. And if the user select cancel or no to the question then it will not post the form.

Here is an example :
<form name="form" action="index.php" method="post">
<input name="edit" type="submit" value="button1" />
<input name="send" type="submit" value="button2" />
<input name="delete" type="submit" value="button3" onclick="return (confirm('Are you sure you want to delete this item ?'));" />
</form>

<?php edit button was pressed
if (isset($_POST['edit'])) {

}

send button was pressed
if (isset($_POST['send'])) {

}

//delete button was pressed
if (isset($_POST['delete'])) {

}
?>

Thanks

Hi, I’ll contact you by email soon.

I couldn’t see the checkbox example. Do you have a checkbox option?

When I call $.ajax inside msgbox does not work.

Any hint?

    $('#accountListForm input').change(function() {

        cb = $(this);

        $.msgbox("Are you sure that you want to activate this account", {
            type: "confirm",
            buttons : [
                {type: "submit", value: "Yes"},
                {type: "submit", value: "No"}
              ]

        }, function (result) {

            if (result=='Yes') {
                form = $('#accountListForm');

                $.ajax({
                    url: $(form).attr('action'),
                    type: $(form).attr('method'),
                    data: $(form).serialize(),
                    success: function(response) {

                    }
                });

            }

            else {
                $(cb).attr('checked', $(cb).is(':checked') ? '' : 'checked' );
            }

        }

        );

    });

Hello,

Do you have any demo for this ?

Well, you create really nice JQuery stuff. I like your job & items too much !

Regards.

Very nice work.

I’ve modified this a bit to allow customization of the display options in the calling code (overlay color and opacity, animation time).

aeroalquimia, I’d be happy to share it – omrikitiki at hotmail.com

Cheers, Omri

Great thing but I´ve to say that it dosn´t work in Safari on iPhone/iPad/iPod. It isn´t possible (or really hard) to enter something because the box is moving all the time. This makes it hard to hit the textbox with the finger and the moving andimation also makes the device very slow and unresponsive. So I can´t use your jQuery MsgBox in my WebApp :(

ok cool that is what i need but if i do that i get:

Parse error: syntax error, unexpected ’.’, expecting T_VARIABLE or ’$’ in /home/admin/domains/fusker.biz/public_html/include/functions.php on line 65

<script type="text/javascript">
$.msgbox("are you 18+?", {
  type: "confirm",
  buttons : [
    {type: "submit", value: "Yes"},
    {type: "submit", value: "No"}
  ]
}, function(result) {
  if (result == "No") {
    window.location.href = "http://www.google.com";
  }
});
</script>

hi can i make a age verification with this

if you are not over 18 you wil be redirected

please let me know how to make this

Yes, something like this:

$.msgbox("are you 18+?", {
  type: "confirm",
  buttons : [
    {type: "submit", value: "Yes"},
    {type: "submit", value: "No"},
  ]
}, function(result) {
  if (result == "No") {
    window.location.href = "http://www.google.com";
  }
});

This guy is amaizing!

He solved my problem in a fast and clean way!

For the record: It was an old plugin I was using in my site (easing 1.1) which was causing conflicts with this one. He pointed me where to update it and it worked like a charm!

Superb A++

All best, Will

Thanks man. I appreciate it :)

To clarify some things:

The header of my page is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The button that is being used as the trigger of the event is this:
<input name="submit" class="tcmsubmit" type="submit" id="guardar" value="Guardar" />

An jQuery click event is binded to this button. It make an AJAX call to save the data and, if succesfull, it call a function called tcm_informar_usuario(mensaje,tipo) like this (sort of):

function tcm_informar_usuario(mensaje,tipo) {
    jQuery.msgbox(mensaje, {
      type:tipo,
      buttons: [
        {type: "submit", value: "Continuar"}
      ]
    });

    return false;
}

What’s wrong with this?

En la función tcm_informar_usuario probaste tirar un alert de mensaje y tipo?

Estoy casi seguro que alguna de esas variables es null, ya que llamas a la función por ajax me gustaría ver esa parte para indicarte si es un problema del script o de la utilización.

Contactame por mail si sigues teniendo problemas, gracias.

Hello…

I began to integrate it into my application.

I had a general function to display notifications so I’m basically changind only one function plus the header of the page.

The css and js file are loading as expected.

However, when I call the msgbox function, which calling button is way below the fold, the whole page fade out but nothing seems to happen.

When I go to the top of the page, I see that message box there… waiting to be clicked.

I click on it, and everyhitng is back to normal.

If I click on the calling button (a “Save” button), and inmediatelly go to the top of the page… then the screen fades out but the msgbox does not appear. I found that it is in fact there… but with a negative top value.

Any clue on this?

Great piece of code. I’m sure I’ll be using it againa and again and again.

My wish list: A parameter to change the initial animation to: fadeIn, Top2Bottom, Left2Right, etc.

A parameter to change the final animation to: fadeIn, Top2Bottom, Left2Right, etc.

A parameter to change the animation when the user canceled the opreation to: fadeIn, Top2Bottom, Left2Right, etc. (yeah, I bit picky… but it will be increase the usability by making clear the UI behaviour when an operation proceeded or when it was cancelled)

Damn… I can’t think how could it be improved! It’s already great as it is.

Hello,

I really like your modal box but the default button for the on-click is the old mac gel. I know a couple of people have asked about getting rid of that and using your modal box on text or an image.

I cannot find an answer to that on any of these discussion pages.

As is I really cannot use this nice extension unless I can get rid of that stupid default button.

Please let me know exactly how to apply to image (preferably) and hyper text.

Thank you. :-(

Can you please contact me via email and could you attach an screenshot of the problem? I don’t have a Mac to test it.

Awesome it works! thanks a lot for your support! I really appreciate it!

Thanks a lot for your reply! it works perfectly now!

i have another question though. How do you change the font color and the font size?

now it has a ugly yellow and the fonts are really small… I’m using firefox..

Thanks in advance..

Great! and for the font color, try adding the code below to your css:

.jquery-msgbox {
  color:#000000;
  font-size:12px;
}

Hi there,

I need a bit of help. i’m using a basic java function for my users to gave a log out confirmation. Basically if they click to yes they willl be log out other wise if No they message box will disappear.

This is what i use for my forum, but i would like to have the same effect with your Mod. Could you please help me?

<script src="{T_TEMPLATE_PATH}/grey_out.js" type="text/javascript"></script>
<script type="text/javascript">
// <![CDATA[
function logout_confirmation()
{
    grayOut(true);
    if (confirm('{L_LOGOUT_CONFIRMATION}'))
    {
        grayOut(false);
        return true;
    }
    else
    {
        grayOut(false);
        return false;
    }
}
// ]]>
</script>

and this is what i use to trigger the message when they click on logOut:

<li><a href="{U_LOGIN_LOGOUT}" onclick="return logout_confirmation();"><span>{L_LOGIN_LOGOUT}</span></a></li>

Hi, sorry for the delay. Try this:

<script type="text/javascript">
// <![CDATA[
function logout_confirmation(el)
{

  $.msgbox('{L_LOGOUT_CONFIRMATION}', {
    type: "confirm",
  }, function(result) {
    if (result) {
      window.location.href = el.href;
    }
  });

  return false;
}
// ]]>
</script>
<a href="{U_LOGIN_LOGOUT}" onclick="return logout_confirmation(this);"><span>{L_LOGIN_LOGOUT}</span></a>

Hi,

I need help. I want to add a msgbox on click on a input button and if the user clicks yes then it will submit form and if user select no or cancel then it will hide the msgbox and the form will not be posted.

<input type="submit" value="Send" onclick="" />

Thanks

<form action="" id="testform" method="post">
  <input type="submit" value="Send" />
</form>

<script type="text/javascript">
  $(document).ready(function() {
    $('#testform').submit(function(ev){

      $.msgbox("Are you sure?", {
        type: "confirm", 
        buttons: [
          {type: "submit", value: "Yes"},
          {type: "cancel", value: "No"}
        ]
      }, function(result) {
        if (result) {
          $('#testform').send();
        }
      });

      ev.preventDefault();
    });
  });
</script>
by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey