Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display a select box in a same page when a button pressed press

Status
Not open for further replies.

daka94

Programmer
Apr 27, 2001
33
US
HI,
I want to display a select box in same page beside the button when user press the button.how can i do this.
thank u in advance.
 
Hi
can u explain it with sample code.
thank u
 
Hi mate,

The following is an example of how to hide and also show it again..

<script language=&quot;JavaScript&quot;><!--
function show(object) {
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) {
if (document.layers && document.layers[object])
document.layers[object].visibility = 'hidden';
else if (document.all)
document.all[object].style.visibility = 'hidden';
}
//--></script>

<div id=&quot;myId&quot; style=&quot;position: relative; visibility: hidden;&quot;>
<form name=&quot;mytestform&quot;>
<Select name=&quot;test&quot;>
<option>Test
<option>Test 2
<option>Test 3
</select>
</form>
</div>

<div style=&quot;position: relative; visibility: visible;&quot;>
<a href=&quot;javascript:;&quot; onClick=&quot;window.show('myId')&quot;>Show The Select</a>
<a href=&quot;javascript:;&quot; onClick=&quot;window.hide('myId')&quot;>Hide The Select</a>
</div>

Hope this helps Wullie

 
What is the significance of div tag here? Can you please elaborate..
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top