Page 1 of 1
click out the hidden textbox.
Posted: Tue Apr 12, 2005 6:01 am
by valen53
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
Posted: Tue Apr 12, 2005 7:09 am
by zenabi
Posted: Tue Apr 12, 2005 7:22 am
by Chris Corbyn
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>
Posted: Wed Apr 13, 2005 5:25 am
by valen53
thanks for reply.
Its Quite useful.
In win XP2, for setting firewall there got menu i wanted.
Just like i click the title, the menu will close up, click again, menu will opened.
any website or source can i refer do ?
Thank you
Posted: Wed Apr 13, 2005 6:17 am
by n00b Saibot
This is achieved in following way
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>
Put the above code in HTML file and try it out
PS:d11wtq, these are my favorite ones ... JS ... 
Posted: Thu Apr 14, 2005 1:48 am
by valen53
Thank you.