473,321 Members | 1,667 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,321 software developers and data experts.

display:none/block switching, hover probem

This is a small table with hover on the table cells.
The first cell is setup to switch from div element to
input element by use of display:block/none. In IE, onclick
the input element is displayed correctly but it disappears if
another hover is triggered.

Any thoughts?
Thanks,Jonny

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<html>
<head>
<title>rolly</title>
<style type="text/css">
<!--
table.rolly a { display:block;
width:100%;height:100%;background-color:#ccccff}
table.rolly a:link {}
table.rolly a:visited {}
table.rolly a:hover { background-color:#ccffff; }
table.rolly a:active {}
/* ie cluge: makes a clickable inside td */
table.rolly a div {width:100%;height:100%}
/* no hover */
table.rollypause a { display:block;
width:100%;height:100%;background-color:#ccccff}

..vis { visibility:visible;z-index: 9}
input.vis {display:block;}
..hid { visibility:hidden }

/*
..vis { display: block}
input.vis {display:block; border:double 4px #ff0}
..hid { display: none }
*/
-->
</style>
<script type="text/javascript">
///////////////////
function InpEdOn(A){
/////////////////////

// max 1 INPUT in A
var Inpy = A.getElementsByTagName("INPUT")[0];
var Divtext = A.getElementsByTagName("DIV")[0];
Inpy.className = "vis";
Inpy.value = Divtext.firstChild.nodeValue+ " ";
// not working in NN71
Inpy.focus();
Inpy.select();
}

/////////////////////
function InpEdOff(Inp){
/////////////////////

var Divtext = Inp.parentNode.getElementsByTagName("DIV")[0];
var Tagtxt = new Array();

Inp.className = "hid";
Tagtxt = Inp.value;
Divtext.firstChild.nodeValue = Tagtxt.toString();
}
//-->
</script>
</head>
<body>
<form name="formy" onsubmit="return false;">
<table style="width:100%" class="rolly" border="5">
<tr><td style="width:33%">
<div style="display:block; position:relative;">
<a href="#nojump" class="vis" onclick="InpEdOn(this)">
<div>&nbsp;</div>
<input type="text" class="hid" style="position:absolute;
top:150px;left:150px;height:2em"
onblur="InpEdOff(this)"/>
</a>
</div>
</td>
<td><a href="#nojump"><div>1-2</div></a></td>
<td><a href="#nojump"><div>1-3</div></a></td>
</tr>
<tr><td><a href="#nojump"><div>2-1 </div></a></td>
<td><a href="#nojump"><div>2-2</div> </a></td>
<td><a href="#nojump"><div>2-3</div> </a></td>
</tr>
</table>
</form>
<div>1-1</div>
</body>
</html>

</body>
</html>
Jul 21 '05 #1
1 5392
Extra::::
The problem seems to be the hover buffer. The cell is changed with
hover on. When it moves off the pre hover buffer is redrawn.
Is there a way to shut-off the hover for current A node?

Jul 21 '05 #2

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

Similar topics

13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
1
by: Jon W | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"> <html> <head> <title>rolly</title> <!-- The desired performance for this gem would be to: 1. click on table cells 2. edit in INPUT 3....
0
by: Jon W | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"> <html> <head> <title>rolly</title> <!-- The desired performance for this gem would be to: 1. click on table cells 2. edit in INPUT 3....
1
by: fleemo17 | last post by:
For increased accessibility, I've replaced "display:none" with the Off-Left method of hiding my CSS drop-down menus because the Jaws screen reader doesn't see any of the menus hidden with...
2
by: Jake Barnes | last post by:
Imagine I've this block of HTML: <p>Alex Schein Mailing List <input type="checkbox" name="newslettersToUse" value="133156"> (<a href="mcControlPanel.php"...
3
by: Erwin Moller | last post by:
Hi group, I have a rather big page with many (databasedependent) pieces of HTML. My question boils down to the following problem (simplified): Considering the folowwing piece of HTML: ...
8
by: VK | last post by:
Hi, given a block element with some content and a link, is it possible to set this element display to none by CSS only? It has to be done only once. It is an absolutely positionned element so...
5
by: libsfan01 | last post by:
function switch_display(switchme) { var el = document.getElementById(switchme); el.style.display = (el.style.display == 'none')? '' : 'none'; } im using this function to switch the display on...
15
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
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...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.