Gmail as a warning window (for displaying information or errors) through jQuery in ASP.NET

I'm looking for some sample code / control that gives me the feel of gmail as a message box through jQuery in ASP.NET.

+5
source share
2 answers

I think your search is jQuery BlockUI .

Watch the demo.

With css, you can map gmail styles.

+13
source

You can use plugins, but you can also have a fixed DIV sitting at the top of the page and fade it in / out. Consider an example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>jQuery</title>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                $('input').click(function() {
                    $('#notification').fadeIn('slow');
                });
            });
        </script>
    </head>
    <body style="height: 1000px;">
        <div id="notification" style="position: fixed; top: 0px; margin-left: 50%; background-color: yellow; font-weight: bold; display: none;">Sending...</div>
        <input type="button" value="Gmail notification!" />
    </body>
</html>

You need to figure out how to hide it (callback after the operation is completed, etc.), style, etc. This is just an example.

+5

All Articles