...

View Full Version : in page popup window



alfehaieotasdh
01-02-2011, 07:19 AM
Hi

I want to create a popup that is completely contained within the page (so i guess its not really a popup). I'm looking for something where if a button is clicked, a small box will come up in the current window and become the active window, while the original window is visible but not active.

It's hard to explain, but its a popup that is contained in the same window. And when the user presses okay or cancel on the "popup" window. They return to where they were in the original window. Is this possible? How would I do it?

Thanks

jmrker
01-02-2011, 05:37 PM
Google is your friend:
See: http://www.javascript-coder.com/window-popup/javascript-popup-window.phtml
and: http://javascript.internet.com/generators/popup-window.html
and: http://www.blazonry.com/javascript/windows.php
and: http://www.webdevelopersnotes.com/tutorials/javascript/creating_opening_new_window_pop_ups_javascript.php3
and many others.

alfehaieotasdh
01-03-2011, 01:11 AM
I'm actually not looking for a regular popup. I'm looking for something like this:

http://okonet.ru/projects/modalbox/
(click on start demo or see it in action near the bottom)

However, i had some trouble using the code that I found online. Mainly, I couldn't create a button on the popup that has a function for its onclick. So, i need some help solving that issue if someone has work with modalbox before, or if anyone can help me create my own inline popup.

Thanks

jmrker
01-03-2011, 02:36 AM
I'm actually not looking for a regular popup. I'm looking for something like this:

http://okonet.ru/projects/modalbox/
(click on start demo or see it in action near the bottom)

However, i had some trouble using the code that I found online. Mainly, I couldn't create a button on the popup that has a function for its onclick. So, i need some help solving that issue if someone has work with modalbox before, or if anyone can help me create my own inline popup.

Thanks

Here's another idea ...
Pay the author and ask him/her.

Krupski
01-03-2011, 03:45 AM
Hi

I want to create a popup that is completely contained within the page (so i guess its not really a popup). I'm looking for something where if a button is clicked, a small box will come up in the current window and become the active window, while the original window is visible but not active.

It's hard to explain, but its a popup that is contained in the same window. And when the user presses okay or cancel on the "popup" window. They return to where they were in the original window. Is this possible? How would I do it?

Thanks

Maybe this:



/**
* A decent popup window
**/
function popup(url, width, height, name)
{
if (!name) { name = 'popup'; }
var yes = ['scrollbars','resizable','dependent'];
var no = ['toolbar','location','directories','status','menubar','fullscreen','channelmode'];
var y = yes.length;
var n = no.length;
var lpos = (screen.width) ? parseInt((screen.width - width) * (1/2)) : 0; /* centered L-R */
var tpos = (screen.height) ? parseInt((screen.height - height) * (1/4)) : 0; /* 1/4 from the top */
var settings = 'height=' + height + ',width=' + width + ',top=' + tpos + ',left=' + lpos;
var options = '';
while (y--) { options += ',' + yes[y] + '=1'; }
while (n--) { options += ',' + no[n] + '=0'; }
window.win = window.open(url.replace(/&/g, '&'), name, settings + options);
if (window.focus) { window.win.focus(); }
return false;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum