473,287 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

show hide layer in IE and Mozilla

2
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.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#first {
position:absolute;
width:500px;
height:300px;
z-index:1;
background-color: #99CCFF;
overflow: auto;
visibility: visible;
}
#second {
position:absolute;
width:500px;
height:300px;
z-index:2;
background-color: #9999FF;
visibility: hidden;
}
#third {
position:absolute;
width:500px;
height:300px;
z-index:3;
background-color: #99CCCC;
visibility: hidden;
}
#fourth {
position:absolute;
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&&parent.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.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'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_showHideLayers('first','','show','seco nd','','hide','third','','hide','fourth','','hide' )"><a href="#" onclick="MM_showHideLayers('first','','show','seco nd','','hide','third','','hide','fourth','','hide' )">1</a></strong></td>
<td width="255" align="center"><strong><a href="#" onclick="MM_showHideLayers('first','','hide','seco nd','','show','third','','hide','fourth','','hide' )">2</a></strong></td>
<td width="255" align="center"><strong><a href="#" onclick="MM_showHideLayers('first','','hide','seco nd','','hide','third','','show','fourth','','hide' )">3</a></strong></td>
<td width="255" align="center"><strong><a href="#" onclick="MM_showHideLayers('first','','hide','seco nd','','hide','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">Your Text </td>
<td width="50%"><input type="text" name="textfield" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield2" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield3" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield4" /></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">Your Text </td>
<td width="50%"><input type="text" name="textfield5" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield22" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield32" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield42" /></td>
</tr>
</table>
</div>
<div id="third">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" height="25">Your Text </td>
<td width="50%"><input type="text" name="textfield6" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield23" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield33" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield43" /></td>
</tr>
</table>
</div>
<div id="fourth">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" height="25">Your Text </td>
<td width="50%"><input type="text" name="textfield7" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield24" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield34" /></td>
</tr>
<tr>
<td height="25">Your Text </td>
<td><input type="text" name="textfield44" /></td>
</tr>
</table>
</div>
</body>
</html>
May 4 '07 #1
1 4139
drhowarddrfine
7,435 Expert 4TB
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
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) {...
1
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?? ...
10
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...
3
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...
2
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...
3
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...
1
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...
2
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...

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.