How to display a small slide popup window?

Posted on 2009-04-01
Last Modified: 2012-05-06
Hi, we want to display a popup window(to show that an operation has been done) but we need this window to appear from the bottom of the window and slide up until it entirely appears.
How we can do that?
Question by:Abdu_Allah
  • 2
LVL 30

Assisted Solution

third earned 20 total points
ID: 24037801

Author Comment

ID: 24038115
Yes exactly but I donot prefer to plugin entire JQuery, is there a sample could available?
LVL 18

Accepted Solution

Morcalavin earned 480 total points
ID: 24038642
Here is a very quick example of how to accomplish something like this on your own.  This is pretty feature limited and doesn't offer a lot of options, but it should give you a place to start from.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" >
<script type="text/javascript" src="SlideUP.js"></script>
<script type="text/javascript">
var slider;
window.onload = function() {
   slider = new SlideUP({
        width: 250, //a valid width
        height: 125, //a valid height
        border: '1px solid #000000', //any valid border css declaration
        background: 'url(SlideUp.png)' //any valid background css declaration.  I used a gradient 250x125 background on mine.
<div><button onclick="'<div style=\'text-align: center;line-height:120px\'>This is a test</div>')">Show popup</button></div>
<div><button onclick="slider.close()">Close Popup</div>

//SlideUP.js source

function SlideUP(options) {

    var mainWindow, mainWindowStyle;

    this.options = options;

    mainWindow = document.createElement('div');

    mainWindowStyle =;

    mainWindowStyle.width = options.width + 'px';

    mainWindowStyle.height = options.height + 'px';

    mainWindowStyle.border = options.border;

    mainWindowStyle.background = options.background;

    mainWindowStyle.position = 'absolute';

    mainWindowStyle.visibility = 'hidden';


    this.mainWindow = mainWindow;

} = function(text) {

    var self, mainWindow, mainWindowStyle, intervalGrow;

    self = this;

    mainWindow = this.mainWindow;

    mainWindow.innerHTML = '';

    mainWindowStyle =;

    mainWindowStyle.left = (window.innerWidth || (document.documentElement.clientWidth || (document.body.clientWidth || 0))) -  this.options.width - 20 + 'px'; = (window.innerHeight || (document.documentElement.clientHeight || (document.body.clientHeight || 0))) - 20 + 'px';

    mainWindowStyle.height = '0px';

    mainWindow.currentHeight = 0;

    mainWindowStyle.visibility = 'visible';

    intervalGrow = window.setInterval(function() {

        if(mainWindow.currentHeight < self.options.height) {

            mainWindowStyle.height = mainWindow.currentHeight + 'px';

   = parseInt('px')[0], 10) - 4 + 'px';



        else {

            mainWindow.innerHTML = text;



    }, 10);


SlideUP.prototype.close = function() { = 'hidden';


Open in new window


Author Comment

ID: 24068059
Morcalavin, here is a question based on your slide window:

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In Part 1 ( we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now