ma-la
10-19-2008, 09:00 PM
When I click Button in html page, the list box should be replaced by text box.
How to do this by using Javascript. Please help me
How to do this by using Javascript. Please help me
|
||||
how to replace listbox by text box dynamicallyma-la 10-19-2008, 09:00 PM When I click Button in html page, the list box should be replaced by text box. How to do this by using Javascript. Please help me jmrker 10-20-2008, 12:55 AM Will this work for you? <html> <head> <title>Listbox - Textbox swap</title> <script type="text/javascript"> function Swapper() { var elem = document.getElementById('dLbox'); if (elem.style.display == 'block') { elem.style.display = 'none'; document.getElementById('dTbox').style.display = 'block'; } else { elem.style.display = 'block'; document.getElementById('dTbox').style.display = 'none'; } } </script> </head> <body> <h1> Listbox - Textbox swap</h1> <div id="dLbox" style="display:block"> <select id="Lbox"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> </div> <div id="dTbox" style="display:none"> <input type="text" id="Tbox" value=""> </div> <button onclick="Swapper()">Swap</button> </body> </html> ma-la 10-20-2008, 12:46 PM I have fields Categories Listbox Product Textbox I have two buttons submit,Save when I click this Save this Listbox should be replaced by textbox Please help me how to change. ma-la 10-20-2008, 01:48 PM Thank You for your help |
| |||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum