I need help. I am not sure what language this is... but I have seen it on many websites but can't find any examples now. Let me illustrate: There is a dropdown menu that has #'s: 1,2,3,4. And then depending on the number you choose, than there is X number of items displayed. In the example I saw, the dropdown asked the number of websites you own... and then it explains the appropriate number of textboxes to input each website separately. Can someone help me out... what is this called or do you have an example? Thanks in advance.
Here is a very primitive one which demos it. You need to have jquery.js also in the same directory: <html> <head> <title>Dropdown demo</title> <script language="javascript" type="text/javascript" src="jquery.js"></script> <script language="javascript"> <!-- $(document).ready(function() { for (i = 1; i <= 10; i++) $('#num_sites').append('<option name="' + i + '">' + i + '</option>'); }); function set_textboxes() { var n = $('#num_sites').val(); $('#sites').empty(); for (i = 1; i <= n; i++) $('#sites').append('<tr><td>Site ' + i + '</td><td><input type="text" name="site' + i + '" /></td></tr>'); } --> </script> </head> <body> <form> <select id="num_sites" name="num_sites" onchange="set_textboxes();"> <option>Select...</option> </select> <table><tbody id="sites"><tr><th>#</th><th>URL</th></tbody></table> </form> </body> </html> Code (markup):