May 6, 2002 #1 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, 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.
May 6, 2002 #2 Wullie Programmer Mar 17, 2001 3,674 GB Hi mate, Use a hidden div that is called by the button click. Hope this helps Wullie http://www.freshlookdesign.co.ukhttp://www.searchit-now.co.ukhttp://www.survivorhelp.co.uk Upvote 0 Downvote
Hi mate, Use a hidden div that is called by the button click. Hope this helps Wullie http://www.freshlookdesign.co.ukhttp://www.searchit-now.co.ukhttp://www.survivorhelp.co.uk
May 6, 2002 Thread starter #3 daka94 Programmer Apr 27, 2001 33 US Hi can u explain it with sample code. thank u Upvote 0 Downvote
May 6, 2002 #4 Wullie Programmer Mar 17, 2001 3,674 GB Hi mate, The following is an example of how to hide and also show it again.. <script language="JavaScript"><!-- 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="myId" style="position: relative; visibility: hidden;"> <form name="mytestform"> <Select name="test"> <option>Test <option>Test 2 <option>Test 3 </select> </form> </div> <div style="position: relative; visibility: visible;"> <a href="javascript:;" onClick="window.show('myId')">Show The Select</a> <a href="javascript:;" onClick="window.hide('myId')">Hide The Select</a> </div> Hope this helps Wullie http://www.freshlookdesign.co.ukhttp://www.searchit-now.co.ukhttp://www.survivorhelp.co.uk Upvote 0 Downvote
Hi mate, The following is an example of how to hide and also show it again.. <script language="JavaScript"><!-- 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="myId" style="position: relative; visibility: hidden;"> <form name="mytestform"> <Select name="test"> <option>Test <option>Test 2 <option>Test 3 </select> </form> </div> <div style="position: relative; visibility: visible;"> <a href="javascript:;" onClick="window.show('myId')">Show The Select</a> <a href="javascript:;" onClick="window.hide('myId')">Hide The Select</a> </div> Hope this helps Wullie http://www.freshlookdesign.co.ukhttp://www.searchit-now.co.ukhttp://www.survivorhelp.co.uk
May 7, 2002 #5 ravula2000 IS-IT--Management Mar 8, 2002 205 US What is the significance of div tag here? Can you please elaborate.. Thanks Upvote 0 Downvote
May 7, 2002 #6 Wullie Programmer Mar 17, 2001 3,674 GB Hi mate, When a link is clicked the div is either hidden or shown. If you didn't have the div, then you would not be able to hide the select box. That's all there is to it.. Hope this helps Wullie http://www.freshlookdesign.co.ukhttp://www.searchit-now.co.ukhttp://www.survivorhelp.co.uk Upvote 0 Downvote
Hi mate, When a link is clicked the div is either hidden or shown. If you didn't have the div, then you would not be able to hide the select box. That's all there is to it.. Hope this helps Wullie http://www.freshlookdesign.co.ukhttp://www.searchit-now.co.ukhttp://www.survivorhelp.co.uk