Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback on: irt.org FAQ Knowledge Base Q984, October 04, 2002 at 05:44:47:

You are here: irt.org | About | Feedback | 4194 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q984

Sent by
Dimitris Anthoulakis on October 04, 2002 at 05:44:47:

Worth:
Very worth reading

Comments:
Here is another version of the javascript, that also changes the title of the button to "Show" and "Hide" each time the user clicks on it.

<html>
<head>
<title></title>
</head>
<body bgcolor="#ffffff">
<SCRIPT LANGUAGE=JavaScript>
var toggle = true;
function show(object) {
window.document.form2.myButton.value = 'Hide';
if (document.layers && document.layers[object])
document.layers[object].visibility = 'visible';
else if (document.all) {
document.all[object].style.visibility = 'visible';
document.all[object].style.zIndex = 100;
}
}
function hide(object) {
window.document.form2.myButton.value = 'Show';
if (document.layers && document.layers[object])
document.layers[object].visibility = 'hidden';
else if (document.all)
document.all[object].style.visibility = 'hidden';
}
</SCRIPT>
<form NAME=form2>
<input type="button" NAME="myButton" onClick="if (toggle = !toggle) hide('myId');else show('myId')" value="Show">
</form>
<div id="myId" style="position: absolute; visibility: hidden;">TestTestTestTestTestTestTestTestTestTest</div>
</body>
</html>


Other feedback on 'irt.org FAQ Knowledge Base Q984' - show all

©2018 Martin Webb