469,336 Members | 5,552 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

Hiding a div in a popup window

Hi all,

If a page is opened in a popup window, banner1 should be hidden, but it
should be visible if opened in a normal window.

I am using following code:

<script>
function hideBanner(){
if(window.opener){
document.write('<style>#banner1{ display:none; }</style>');
}
}
hideBanner()
</script>

See demo page: http://kiranmn.netfirms.com/temp/opener.html

This code is working as expected in Win2000/IE 6.

But in
OS: Windows XP Home SP2
IE: 6.0.2900.2180.xpsp_sp2_rtm.040803-2158

banner1 is hidden even in opener (that is parent) window. Anything to
do with return value of 'window.opener' property?

Any of you guys facing this problem in your browser?

Thanks in advance

- Kiran Makam

Jul 23 '05 #1
1 1372
To test the demo page (in parent window as well as child window), copy
the link kiranmn.netfirms.com/temp/opener.html and paste it in your
browser's address bar.

if you click the link, page openes in a popup and banner1 getts hidden.

- Kiran Makam

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Code Monkee | last post: by
8 posts views Thread by Jho | last post: by
7 posts views Thread by anthony.turcotte | last post: by
3 posts views Thread by Andy Lim | last post: by
2 posts views Thread by Richard Maher | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.