Of course, just wrap the <select> in a div, and you can easily add a text box using jQuery. Sort of:
<div class="conditional> <select name="DDLConditional1" size="1"> ... </select> </div> <script type="text/javascript"> $(document).ready(function() { // store our select as a jQuery object var $select = $(".conditional select"); $select.change(function() { // get our parent (the div) var $wrapper = $(this).closest(".conditional"); // if the selected option text is "in between" if($("option:selected", this).text() == "is between") { // append a textbox var $newTextbox = $("<input type='text' />"); $newTextbox.css('color', 'red'); //perhaps set some CSS properties? $wrapper.append($newTextbox); } }); }); </script>
Here's an example that works in IE 7/8, Firefox, Chrome, and Safari.
source share