Jump to content
xisto Community
miCRoSCoPiC^eaRthLinG

Javascript: How Do I Create Embedded Pop-up Windows?

Recommended Posts

The post title summarises my query - how do I create pop-up windows that are embedded inside a page? Broadly, there are two kinds of JavaScript pop-ups.. one is that ultra annoying one, which pops out a new instance of a browser window and displays something there (usually an ad) - made infamous by all the warez and porn sites. Second one, which has come to be quite well-known of late is the kind you see in recent versions of WordPress (in the Visual Editor) as well as LightBox based galleries. Here a small window (or rather a div) pops-up embedded in the middle of the page. It's a floating div that can be dragged around anywhere. A similar notification window can be sighted even in the recent versions of IPB when you receive a new PM. This is exactly what I want to create - but I dont have no clue how to go about it. I tried searching for "embedded" "pop-up" etc. but always got tutorials for silly JS popup windows...Can anyone help shed light on this? And don't ask me to study the lightbox code - I already did. But my JS is so pathetic I couldn't do much with it. If you can point me to a good tutorial that shows you how to do this it'll be great ;)Cheers,m^e

Share this post


Link to post
Share on other sites

My efforts had gone in vain as well. I first noticed those in the Konetera powered in-text ads. I tried to get some hold on their cryptic codes but wasn't successful, more so because of the frustration the process involves.Dropping the philosophical note, I would give it one more try. I'll keep you updated on the progress.

Share this post


Link to post
Share on other sites

One thing I can't understand, is which function is invoked in the javascript once we link it in our HTML page.

For Example, the Kontera code includes the following text:-

<script type="text/javascript" SRC="http://kona.kontera.com/javascript/lib/KonaLibInline.js"></script>

There is no call to any of the functions contained in the KonaLibInLine.js file anywhere on the page.

Share this post


Link to post
Share on other sites

For me, i've use jquery http://jquery.com/

and thickbox http://forums.xisto.com/no_longer_exists/

 

Thickbox is an extension for jquery. Thickbox will create a dialogbox like "something" in the middle of the page, and gray out the rest. Clicking anything outside will return to the original page. I find it a lot easier to modify, since it's based on jquery, and jquery is in fact very powerful. And page for Thickbox can be embded HTML, iframe, another page or image (comes with it's own slide browser).

 

For your application, all you need is to comment out the code that gray out the page, and then add code to move the dialogbox around. That's it.

 

You can see a sample of it at sourceforge, when you select the mirror for the file you're downloading.

 

Give it a try, i found it amazing

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.