Dynamic floating window using javascript

I want to create a dynamic floating window with a close button in the corner. Is it possible, and also I want to add some content dynamically to this window.

Please help me .. It should be in javascript .. Better without AJAX ..

Thanks at Advance

+4
source share
6 answers

jQuery UI has a terrific floating window. What's cool about the jQuery UI version is that you can also pack it using the UI theme manager, which means less styling time.

Take a look here: jQuery Dialog Examples

All that is required is to create a container (possibly a div) and one line of code. Something like that:

<div id="example">I'm in a dialog!</div> $("#example").dialog(); 

Here's the documentation: jQuery UI Dialog Documentation

+12
source

What you are looking for is called the lightbox technique. Here is a comparison of many lightbox methods .

Many exist on the Internet, here are some of jquery and libs prototypes:

Also check out the lightbox wikipedia article .

+3
source

My favorite has always been Scriptaculous , which allows you to do all kinds of interesting visual things. New children on the block use jquery . One of these two should do the trick for you.

Both sites have many designs that do what you want.

0
source

Good at the most basic, just create a div and add content by setting innerHTML to the HTML line. Positioning it can be tricky, as you have to worry about scrolling, and different browsers have different ways to control this. You may also want to position relative to some source element on the page, which you can do by digging the element and placing it from the event object received by the javascript function when you click on the original element.

Google hover popup - first link http://www.calcaria.net/javascript/2006/09/javascript-hover-over-html-popup.html

0
source

There are many different libraries for creating windows. I found that Livepipes has a very well-rounded and highly customizable javascript library that includes window controls along with so many others. http://livepipe.net/control One that I have not used, but looks promising, prototypeui . It is based on prototypes and scripts of javascript libraries. jqModal is another that I used based on jQuery.

0
source

take a look at fancybox http://fancybox.net/

0
source

All Articles