471,887 Members | 1,546 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

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 1398
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
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.