473,725 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

show hide layer in IE and Mozilla

2 New Member
hi,

I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers.

I don`t want to change the way i have used to show and hide layers.
check down code :-

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitl ed Document</title>
<style type="text/css">
<!--
#first {
position:absolu te;
width:500px;
height:300px;
z-index:1;
background-color: #99CCFF;
overflow: auto;
visibility: visible;
}
#second {
position:absolu te;
width:500px;
height:300px;
z-index:2;
background-color: #9999FF;
visibility: hidden;
}
#third {
position:absolu te;
width:500px;
height:300px;
z-index:3;
background-color: #99CCCC;
visibility: hidden;
}
#fourth {
position:absolu te;
width:500px;
height:300px;
z-index:4;
background-color: #FFCCCC;
visibility: hidden;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf ("?"))>0&&paren t.frames.length ) {
d=parent.frames[n.substring(p+1 )].document; n=n.substring(0 ,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.fo rms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.l ayers&&i<d.laye rs.length;i++) x=MM_findObj(n, d.layers[i].document);
if(!x && d.getElementByI d) x=d.getElementB yId(n); return x;
}

function MM_showHideLaye rs() { //v6.0
var i,p,v,obj,args= MM_showHideLaye rs.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findOb j(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?' visible':(v=='h ide')?'hidden': v; }
obj.visibility= v; }
}
//-->
</script>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td><table width="50%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="255" align="center"> <strong onfocus="MM_sho wHideLayers('fi rst','','show', 'second','','hi de','third','', 'hide','fourth' ,'','hide')"><a href="#" onclick="MM_sho wHideLayers('fi rst','','show', 'second','','hi de','third','', 'hide','fourth' ,'','hide')">1</a></strong></td>
<td width="255" align="center"> <strong><a href="#" onclick="MM_sho wHideLayers('fi rst','','hide', 'second','','sh ow','third','', 'hide','fourth' ,'','hide')">2</a></strong></td>
<td width="255" align="center"> <strong><a href="#" onclick="MM_sho wHideLayers('fi rst','','hide', 'second','','hi de','third','', 'show','fourth' ,'','hide')">3</a></strong></td>
<td width="255" align="center"> <strong><a href="#" onclick="MM_sho wHideLayers('fi rst','','hide', 'second','','hi de','third','', 'hide','fourth' ,'','show')">4</a></strong></td>
</tr>
</table></td>
</tr>
<tr>
<td><div id="first">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="50%" height="25">You r Text </td>
<td width="50%"><in put type="text" name="textfield " /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 2" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 3" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 4" /></td>
</tr>
</table>
</div></td>
</tr>
</table>
<div id="second">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="50%" height="25">You r Text </td>
<td width="50%"><in put type="text" name="textfield 5" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 22" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 32" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 42" /></td>
</tr>
</table>
</div>
<div id="third">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="50%" height="25">You r Text </td>
<td width="50%"><in put type="text" name="textfield 6" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 23" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 33" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 43" /></td>
</tr>
</table>
</div>
<div id="fourth">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="50%" height="25">You r Text </td>
<td width="50%"><in put type="text" name="textfield 7" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 24" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 34" /></td>
</tr>
<tr>
<td height="25">You r Text </td>
<td><input type="text" name="textfield 44" /></td>
</tr>
</table>
</div>
</body>
</html>
May 4 '07 #1
1 4171
drhowarddrfine
7,435 Recognized Expert Expert
You cannot apply the 'onfocus' property to <strong>.
May 4 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6046
by: Mark | last post by:
Hi - I have a function which shows/hides a <div> on my page - this appears to oinly work in IE, but I also need it to work in Netscape 7.1. My function is in my head: function openIt(faq) { showIt = document.all(faq); if (showIt.style.display == "none") { showIt.style.display = "" } else {
1
1306
by: Stephan | last post by:
I need a way to hide <div> that works in Mozilla/Netscape. My macromedia behavior does not work anymore. Also, and good ways to time the hideLayer? As in hide the layer after x seconds?? Thanks! Jeff
10
3207
by: David | last post by:
Hi everyone, Hoping there are some .js/browser experts out there that can help with this weird problem. I have made a swap div routine and applied the events to menu buttons with a closer layer behind the menus. The closer div has a lower index than the submenu divs so it appears behind them. The closer div contains a transparent gif with an event applied to it to close all of the divs when moused over.
3
14444
by: Ryh | last post by:
I have the following scritpt. It hides div layer when mouse is out of the div layer. Inside DIV I have IFRAME box. Unfortuantely it does not work in Mozilla or IE 5.5. It hides div when cursor is inside IFRAME. NOte that IFRAME is inside DIV so it should not hide DIV. It Works fine in IE6.0. Could any one help? Example:
2
7012
by: Mateo | last post by:
Hi! I have a litle JS problem.... I'm trying to make show/hide table JS function, but my show/hide table function works only on IE.... It works in mozilla partially. Actually,every time when I contract table the empty field is left. You can see example in left side menu on www.kijevo.hr when you click on plus or minus. If you
3
6400
by: Merlin | last post by:
Hi there, I am trying to create a form with an dynamic field that can be shown or hidden. As I saw for example on google it is possible with JS to show a layer and move the content underneath that layer further down uppon showing this layer. When a person closes that layer the content underneath the layer moves up again and closes the empty space. How is this possible? I am playing around with some code I am posting with this thread....
1
3417
by: aotash | last post by:
This javascript shows and hides description (like alt in image tag). It works in IE but not in Mozilla, what is wrong please help: <SCRIPT LANGUAGE="JavaScript"> // ############## SIMPLE BROWSER SNIFFER if (document.layers) {navigator.family = "nn4"} if (document.all) {navigator.family = "ie4"} if (window.navigator.userAgent.toLowerCase().match("gecko")) {navigator.family = "gecko"} // ######### popup text
2
2145
by: dusk | last post by:
Hi, I have a page with lots of hidden divs which are revealed based on choices made at each 'layer'. So I've used naming convention which represents the order in which each div becomes visible - 'a100', 'a200', 'a300' for the first 'layer'; 'b100', 'b200', 'b300' for the second; 'c100, 'c200', 'c300' for the third ... etc I'm writing the javascript functions to hide and show the appropriate divs and its getting out of hand pretty...
0
8888
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
8752
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
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8097
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
6702
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
6011
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();...
1
3221
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.