Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

IE8 - Changing the visibility of an IFRAME's content via script is

microsoft.public.internetexplorer.general






Speedup My PC
Reply
  #1 (permalink)  
Old 04-03-2009
Nick S
 

Posts: n/a
IE8 - Changing the visibility of an IFRAME's content via script is
I have a problem with IE8 (version 8.0.6001.18702) under Windows XP. My
scenario:

There are two pages - one contains an IFRAME, another represents the
IFRAME's content.

The first page has a TABLE and SPAN elements. The table has a single cell
that contains an IFRAME element. A click on the SPAN dynamically hides the
IFRAME's content by setting the table cell's VISIBILITY style attribute to
HIDDEN.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td id="iframeContainer">
<iframe src="IframeContent.aspx" style="width:
500px;height: 500px;" frameborder="0"></iframe>
</td>
</tr>
</table>
<span
onclick="document.getElementById('iframeContainer' ).style.visibility='hidden';">Hide</span>
</div>
</form>
</body>
</html>

The second page (IframeContent.aspx), which is the IFRAME's source, contains
a table whose border settings are defined.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td id="iframeContainer">
<iframe src="IframeContent.aspx" style="width:
500px;height: 500px;" frameborder="0"></iframe>
</td>
</tr>
</table>
<span
onclick="document.getElementById('iframeContainer' ).style.visibility='hidden';">Hide</span>
</div>
</form>
</body>
</html>

If the second page is used in IE7 mode, this scenario doesn't work as
expected. A click on the first page's SPAN element doesn't hide table borders
within the IFRAME's content page, while all other content is hidden.
It's important that borders of the content page's table only remain visible,
if trying to change the VISIBILITY of the first page's table cell via script.
If the VISIBILITY attribute is defined in the markup (style="visibility:
hidden"), borders are not displayed.

If the second page doesn't have declaration <meta
http-equiv="X-UA-Compatible" content="IE=7" />, all works well.
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mazu Delivers Next-Gen WAN Visibility Paul Security News 0 10-22-2007 16:00
xp-vista visibility alant microsoft.public.windows.vista.networking sharing 2 10-16-2007 11:03
Visibility on a Domain Pat Brown microsoft.public.windows.vista.networking sharing 7 05-16-2007 00:30
Cursor Visibility =?Utf-8?B?Q290dG9ubW91dGg=?= microsoft.public.windows.vista.general 3 04-05-2007 20:50
One way network visibility =?Utf-8?B?Qy4gQnJpdHRvbg==?= microsoft.public.windows.vista.networking sharing 2 12-29-2006 22:27




All times are GMT +1. The time now is 21:04.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120