i have a transaction form. B'cos too many textbox in the form, i hope that some of the textbox can be hidden, but will show a link or title for click out the hidden textbox. If dunwant to used, click again to hidden it.
any source can refer ?
thank's reply
click out the hidden textbox.
Moderator: General Moderators
Try this link:
http://www.stuffandnonsense.co.uk/archi ... ields.html
http://www.stuffandnonsense.co.uk/archi ... ields.html
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
You mean... how do you hide a textbox?
You could use some tricky DOM scripting (a bit advanced perhaps).
Or get there abouts the same effect by just chaging the display from none to block.
Code: Select all
<script type="e;text/javascript"e;>
function toggleON() {
document.getElementById('showHide').style.display = 'block';
document.getElementById('toggleLink').innerHTML = '<a href="e;javascript:toggleOFF()"e;>Hide text box</a>';
}
function toggleOFF() {
document.getElementById('showHide').style.display = 'none';
document.getElementById('toggleLink').innerHTML = '<a href="e;javascript:toggleON()"e;>Show text box</a>';
}
</script>
<span id="e;toggleLink"e;><a href="e;javascript:toggleON()"e;>Show text box</a></span>
<form>
<div id="e;showHide"e; style="e;width:400px; height:200px; display:none"e;>
<textarea style="e;width:100%; height:100%"e;>Text here</textarea>
</div>
HTML Content here
</form>- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
This is achieved in following way
Put the above code in HTML file and try it out 
PS:d11wtq, these are my favorite ones ... JS ...
Code: Select all
<script>
function doIt()
{
if(document.getElementById('menu').display == "e;none"e;)
document.getElementById('menu').display = "e;"e;;
else
document.getElementById('menu').display = "e;none"e;;
}
</script>
<p onclick="e;doIt()"e;>Show / Hide Menu</p>
<div id="e;menu"e;>
<ol>
<li>One
<li>Two
<li>Three
<li>Four
<li>Five
</ul>
</div>PS:d11wtq, these are my favorite ones ... JS ...