| |
rudrarup
Posts: 58
Score: 0
Joined: 5/26/2005
From: Pune
Status: offline
|
You could use a javascript solution: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> <style> </style> <script language = "javascript"> <!-- var firstBit1 = "<select name='menu' id = 'menu' size='"; var firstBit2 = "' multiple='multiple'>"; var orig_conts = "<option selectec value='1'>maple<option value='2'>hickory<option value='3'>birch</option>"; var lastBit = "</select>"; var size = 3; var x = 3; function initRefresh() { //replace size with x to make the dropdown list increase in vertical size with each selection document.getElementById('div').innerHTML = firstBit1 + size + firstBit2 + orig_conts + lastBit; } function addItem() { x++; orig_conts = "<option value = '" + x + "'>" + document.form.add.value + "</option>" + orig_conts; initRefresh(); document.form.add.value = ""; document.form.menu.selectedIndex = 0; } //--> </script> </head> <body onload = "initRefresh()"> <form name = "form" id = "form"> <div name = "div" id = "div"></div> <input type = "text" name = "add" id = "add"><br> <input type = "button" value = "Click" onclick = "addItem()"> </form> </body> </html> Hope this helps...
_____________________________
Be content. Have the sporting spirit. Trishanku.
|
|