-
Re: IE4 won't recognize variable, YOUR SOLUTION! W/ EXAMPLE
hi,
What "rick schaefer" wrote would probably work, but the solution i`ll provide
should also work perfectly fine. Try it:
The easiest and most effective solution:
Example Follows Below (defining 2 properties, "visibility / display"):
<body>
<P>
<FONT FACE="verdana,arial,helvetica" SIZE=2>
<TABLE><TR><TH>Visibility</TH><TH>Display</TD></TR>
<TBODY VALIGN=TOP>
<TR><TD width=50%><P style="color:blue" onclick="document.all.v.style.visibility=
document.all.v.style.visibility=='hidden' ? '' : 'hidden'"><input type="button"
value="Visibility Example (Cross Browser)" name="B3" onclick="document.all.v.style.visibility==
document.all.v.style.visibility=='hidden' ? '' : 'hidden'">
</FONT>
</P><FONT FACE="verdana,arial,helvetica" SIZE=2>
<P id=v name="v" style="visibility:hidden">This is <EM>sample data</EM>
made visible. The space for this content is already taken up, even though
the content is initially invisible.</P>
</font>
<FONT FACE="verdana,arial,helvetica" SIZE=2>Visibility hides elements
but it
shows the space taken by it.
</TD>
<TD width=50%><P style="color:blue" onclick="document.all.d.style.display=
document.all.d.style.display=='none' ? '' : 'none'" title="A tooltip can
even be added to every element using the title attribute!"><FONT FACE="verdana,arial,helvetica"
SIZE=2><input type="button" value="Display Example (Cross Browser)" name="B3"
onclick="document.all.v.style.visibility== document.all.v.style.visibility=='hidden'
? '' : 'hidden'">
</FONT>
</P>
<P id=d style="display:none">This is <EM>sample data</EM> that is
being displayed. The space for this content is not taken up until the content
is displayed.
Notice how the line following this data automatically moves down.</P>
<P>Display property hides elements permanently.</P><P>
</TD>
</TR>
</TBODY>
</TABLE>
</body>
</HTML>
Author: Neo
E-Mail: daniyal2k@hotmail.com
This article was posted by Neo.
( http://storm.prohosting.com/~4g )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks