HTML Help needed

Soldato
Joined
17 Nov 2004
Posts
10,199
Location
The Republic
I am designing a new website at the moment which is basically a non commercial site for PC Game Patches and Demos. its not the one in my Sig, don't worry

What I want to do is a brief description of a file and then the option of clicking a button to give further detail on a file. Basically part of the document would be hidden until a button is pressed then it would expand the document to give all of the contents of that document.

Is it possible to code this in html ?

Thanks Loki
 
Javascript job...

Code:
<html>
<head>
<script type="text/javascript">
// toggle visibility

function toggle(id){
if (document.getElementById){
el = document.getElementById(id);
if (el.style.display == "none"){
el.style.display = "";
} else {
el.style.display = "none";
}
}
}
</script>
</head>
<body>

<input type='button' name='button1' value='Show/Hide textbox' onclick="toggle('id1');return false;" />
<input type="text" id='id1' />
</body>
</html>
 
Thanks

So how do I reference the formatted text I want to be hidden.

I have tried replacing id with the text I want and it just brings the code through

or how would I reference id1 in the code to the content I want ?

Sorry for nubish question

Doofus here has sorted

Thanks
 
Last edited:
Back
Top Bottom