DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   Can I hide a pop-Up window (http://www.daniweb.com/forums/thread77051.html)

aparnesh May 1st, 2007 11:47 am
Can I hide a pop-Up window
 
I am developing an intranet application, in which, in some pages, when the user selects an option, I am using a pop-up window to retrieve the data and displaying it in the main page. The pop-up opens, fetches data, puts in main page and closes itself.

Since the user is not interacting with the pop-up, I would prefer it to be hidden. Can this be done ? I checked a Javascript book, which says the 'alwaysLowered' property can be used to send the pop-up behind other windows but this is a security feature and available only for signed scripts.

My Questions are:
1. Can the pop-up be hidden ?
2. What is a signed script ?

GliderPilot May 1st, 2007 12:09 pm
Re: Can I hide a pop-Up window
 
It depends on the way your creating the window. I'm sure there are many ways to do it. If I remeber correctly you can do it via this method:

 
var win = new PopupWindow();
 
win.showPopup();
 
win.setUrl("http://www.site.com");
 
win.hidePopup();

Hope this helps you.

aparnesh May 2nd, 2007 2:30 am
Re: Can I hide a pop-Up window
 
Sorry, it's not working. I am getting the error
"PopupWindow is undefined"

Here's the code (with what I was using earlier)

var newWindow ;
var v_Options;
var v_Bars;
v_Bars = 'directories=no, location=no, menubar=no, status=no,titlebar=no,toolbar=no';
v_Options = 'scrollbars=yes,resizable=no,Height=10,Width=10,left=100,top=100,visible=false,alwaysLowered=yes';
//newWindow = window.open("Popdata.htm",'PrintWin',v_Bars + ',' + v_Options);
newWindow = new PopUpWindow() ;
newWindow.showPopup();
newWindow.setURL("Popdata.htm");
newWindow.hidePopup();

pojke May 2nd, 2007 9:58 am
Re: Can I hide a pop-Up window
 
Use windows called popunder. Its used often in internet advertisements.
Here u have example:
http://javascriptkit.com/script/script2/popunder.shtml

MidiMagic May 3rd, 2007 2:46 am
Re: Can I hide a pop-Up window
 
Actually, opening a hidden window is on the list of operations forbidden for security reasons.

But there is nothing to prevent you from putting it under something. It still shows on the taskbar.

aparnesh May 3rd, 2007 1:58 pm
Re: Can I hide a pop-Up window
 
"Putting it under something" = Putting it behind another window ? That's fine with me. But how do I do that ? By setting the z-order of the window ? If it shows in the taskbar, it's acceptable.

MidiMagic May 4th, 2007 11:59 pm
Re: Can I hide a pop-Up window
 
Just drop something else on top of it real fast, or send the focus to the page under it.


All times are GMT -4. The time now is 4:05 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC