Click to See Complete Forum and Search --> : Showing a Hidden Window


Evie
02-13-2007, 04:59 PM
I have a hidden window using the iframe:


<iframe src="addnewitem.php" name="hiddenWindowAddNew" style="display: none" width="680" height="300" frameborder="0">
<!-- Alternate content for non-supporting browsers -->
If you are seeing this, please upgrade your browser :)
... </iframe>


and on a list item select I want to show the hidden window. I have this code:


function addItem(){
alert('In Add Item');
window.hiddenWindowAddNew.style.display="inline";
}


When I select the item, the alert pops up, but the window does not show.

ryanbutler
02-13-2007, 05:25 PM
Try:

window.hiddenWindowAddNew.style.visibility="visible";

Or:

window.hiddenWindowAddNew.style.display="block";

The different between the two is the former will hide the window from view but keep the space it occupies. The latter will hide the window from view and also remove the space it occupies.

Kind of a guess though.

Evie
02-13-2007, 06:01 PM
Well, I have the hidden part down. I need to have it show when I run the function.

ryanbutler
02-13-2007, 07:54 PM
Display set to block or using visibility set to visible I would think would show it. Do you have the code for the file you're referring to in the iframe?

Evie
02-13-2007, 08:42 PM
yeah its showing up fine as long as I have it visible and stuff. I let it be visible so I could test it, but now I want to hide the window, yadda yadda :)

so, if I set it to 'display: none' and in the script '.visibility="visible' it does not work.

I need to know what to put in the frame itself to make the visiblity work.