473,847 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

need javascript to show a layer

Can someone help me figure out how to show a hidden layer *ONLY* if the
browser is IE for windows? I want it to remain hidden for everything else,
Netscape, Opera, Mozilla and anything for Mac. I'm not having much luck
out here.

Thank you.
Jul 20 '05 #1
4 3115
ri********@cs.e du (Richard) writes:
Can someone help me figure out how to show a hidden layer *ONLY* if the
browser is IE for windows? I want it to remain hidden for everything else,
Netscape, Opera, Mozilla and anything for Mac. I'm not having much luck
out here.


While I can't help to wonder why you would want that, here are some
suggestions.

Since you only care about IE, you might only care about some IE versions.
In IE 5 and later, you can use conditional comments:
<!--[if IE]>
<div id='hidden'>
...
</div>
<![endif]-->
All other browsers will only see HTML-comments. (I don't *think* IE 5.2/Mac
will understand conditional comments).
<URL:http://msdn.microsoft. com/library/default.asp?url =/workshop/author/dhtml/overview/ccomment_ovw.as p>

Otherwise, you must find a way to uniquely identify IE/Win. It has
been discussed before, and the conclusion was that object detection is
not a safe way to detect IE. Other browsers emulate IE in any way they
can, including lying about their name in navigator.appNa me etc. If you
find a feature that distinguishes IE from other browsers, chances are
another browser will emulate that feature sooner or later.

So far, no browser have implemented conditional comments. Maybe one
will eventually. It is what I would use, and not care about IE4.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
lr*@hotpop.com (Lasse Reichstein Nielsen) wrote in
<u1**********@h otpop.com>:
ri********@cs. edu (Richard) writes:
Can someone help me figure out how to show a hidden layer *ONLY* if
the browser is IE for windows? I want it to remain hidden for
everything else, Netscape, Opera, Mozilla and anything for Mac. I'm
not having much luck out here.
While I can't help to wonder why you would want that,


Because the layer contains a flash movie which MUST play in transparent
mode, which is only supported in IE for windows. Ok?
here are somesuggestions.

Since you only care about IE, you might only care about some IE
versions. In IE 5 and later, you can use conditional comments:
<!--[if IE]>
<div id='hidden'>
...
</div>
<![endif]-->


That works perfectly. Thank you.
Jul 20 '05 #3
ri********@cs.e du (Richard) writes:
Because the layer contains a flash movie which MUST play in transparent
mode, which is only supported in IE for windows. Ok?


Transparent mode, that is the same as windowless mode with transparent
background, set with the wmode parameter of the embed tag, right?

According to
<URL:http://www.macromedia. com/support/flash/releasenotes/player/rn_6.html>
windowless mode, including the transparent background mode, is supported by:
Windows Internet Explorer
Windows Netscape 7.0
Windows AOL
Windows Mozilla 1.0
Mac OS X IE 5.1
Mac OS X IE 5.2
Mac OS X Netscape 7.0
Mac OS X AOL
Mac OS X Mozilla 1.0
Mac OS X CompuServe
See also <URL:http://www.macromedia. com/support/flash/ts/documents/wmode.htm>
for which version of Flash is needed for each browser.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #4
Lasse Reichstein Nielsen <lr*@hotpop.com > writes:
windowless mode, including the transparent background mode, is supported by:


And Opera 7 seems to work too.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1474
by: mscir | last post by:
I was calling a function in a js file from an image onClick event, but someone still using Netscape 4 (!) complained that it didn't work. I read that img onClick doesn't work in Netscape 4, so swithced it to "javascript:show(...);" and the code works, but I read in this group that it was not wise to do that, here's the working version, using the not recommended approach: <a href="javascript:show('art_2.jpg','600','448');" target="_self">...
2
4773
by: l!m!t | last post by:
Hello, I hope somebody can help me I have been at this for hours. I am new to JavaScript. I need a script to show a layer of hidden content only when on a certain URL. I have searched and found nothing, is this possible to do ? Example: http://mydomain.com/index.php?1 = content = hidden http://mydomain.com/index.php?2 = content = show
16
9042
by: MS newsgroup | last post by:
I don't have clear reasons why we need business logic layer and data logic layer instead of having only data logic layer. Are there any good reasons for that?
22
2340
by: the_grove_man | last post by:
I purchased a book titled "Pro ASP.NET 2.0" to get up to speed on web stuff because I ususally do Windows Form Applications.. But in the first chapters I was reading this week it brought to mind some things I heard in the past that I thought someone could clarify. On Page 6 it states "ASP.NET web pages (and web services) are executed within the CLR (common language runtime), so they can be authored in any language that has a...
3
2290
by: Jim | last post by:
How can I use Javascript to show a layer named "callout" after the page has been delayed for 5 seconds? Using the onLoad behavior to execute a "Call Javascript" action. What is the correct syntax? HELP!
1
3146
by: saravanatmm | last post by:
I need javascript code for validate the email address. Email address field cannot allowed the capital letters, special characters except '@' symbol. But can allowed the small letters, numeric numbers. Now i use this script for validate the email address. But it allows the cpital letters otherwise its working correctly. SCRIPT FUNCTION ************************************************
10
7371
by: Dutchmarshalls | last post by:
Hi All, I'm using a Pay Pal form script, but locally tested in Dreamweaver with a browser it will do exactly what I'm aspect it to do. Only when I'm uploaded the file on the server it will give this ERROR. By th way, I'm using a Joomla 1.5.3 site. The URL: http://www.dutchmarshalls.com/index.php/service/51-service/87-price-and-product-list- The ERROR CODE:...
1
2512
by: swetha123 | last post by:
hello, Can any one please tell me I am Using php,Mysql,CSS to build my site In my database i have small images and large images i am show the small images to the right of the main container now i need to show the large image to left side when user clicks on these small images but when i click on the images it is showing the large image in the new browser
3
2517
by: swetha123 | last post by:
hello, Can any one please tell me I am Using php,Mysql,CSS to build my site In my database i have small images and large images i am show the small images to the right of the main container now i need to show the large image to left side when user clicks on these small images but when i click on the images it is showing the large image in the new browser
0
9882
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9727
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10335
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9481
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7880
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5719
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5909
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4116
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.