473,657 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

display:none/block switching, hover probem

<!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. click away, data presented in table cell.

2.0 The table cells have hover highlighting.

**** Problem: IE
When INPUT is switched to display:block through CSS change,
the INPUT will disappear if another hover is activated.
-->
<style type="text/css">
<!--
table.rolly a { display:block;
width:100%;heig ht:100%;backgro und-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%;hei ght:100%}
/* no hover */
table.rollypaus e a { display:block;
width:100%;heig ht:100%;backgro und-color:#ccccff}

..vis { visibility:visi ble}
input.vis {display:block; }
..hid { visibility:hidd en }

/*
..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.getElementsBy TagName("INPUT" )[0];
var Divtext = A.getElementsBy TagName("DIV")[0];
Inpy.className = "vis";
Inpy.value = Divtext.firstCh ild.nodeValue+ " ";
// not working in NN71
Inpy.focus();
Inpy.select();
}

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

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

Inp.className = "hid";
Tagtxt = Inp.value;
Divtext.firstCh ild.nodeValue = Tagtxt.toString ();
}
//-->
</script>
</head>
<body>
<form name="formy" onsubmit="retur n false;">
<table style="width:10 0%" class="rolly" border="5">
<tr><td style="width:33 %">
<div style="display: block; position:relati ve;">
<a href="#nojump" class="vis" onclick="InpEdO n(this)">
<div>&nbsp;</div>
<input type="text" class="hid" style="position :absolute;
top:150px;left: 150px;height:2e m"
onblur="InpEdOf f(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>
Jul 23 '05 #1
1 2159
Jon W wrote:
<!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. click away, data presented in table cell.

2.0 The table cells have hover highlighting.

[...]

Seems you have a CSS problem, not a JavaScript problem. Try:

comp.infosystem s.www.authoring.html
--
Fred
Jul 23 '05 #2

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

Similar topics

13
40717
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 style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
1
5419
by: Jon W | last post by:
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">
0
5820
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. click away, data presented in table cell. 2.0 The table cells have hover highlighting.
1
2317
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 "display:none". The Off-Left method (placing elements way over to the left beyond the browser window) seems to work well in everything except IE 6 for the PC, where it displays the drop-downs about an inch to the right of where they should be. (View...
2
7989
by: Erwin Moller | last post by:
Hi group, I have this obscure problem that really needs to be fixed, but I am out of ideas. Because the original script is very big, I'll try to summarize its functionality. Setup: - many form-elements that will 'activate' a part of the form based on the selection made.
2
9036
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" onClick="hideOrShowDivById('emailList133156'); return false;">See emails?</a>)</p> <form method="post" action="mcControlPanel.php" id="emailList133156" style="display:none;"><textarea name="formInputs">nazjeehaj@son.org,
3
4592
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: <div id="div1" style="display:none"> <div id="div2" style="display:block">
8
4242
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 visibility:hidden will do as well. <div> <p>Some content</p> <p><a href="#">Hide</a></p>
5
2030
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 and off of a given element. BUT if the element is set to 'none' to begin with then it wont display it. please help...
15
3149
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, of course). <!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-Language" content="en-us" />
0
8399
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
8312
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
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
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
7337
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
6169
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
5632
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
4159
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...

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.