title: JavaScript: is it possible to dynamically change an <input> to a <select> element and back again?
body: <p>I'm working with "Zen Cart" shopping cart. The default is to have visitor select country and "state" populates dynamically.  If they choose a country that has no defined states, the drop down says "type your state below" and an input box dynamically appears.</p>
  
  <p>Current way is fine if the states are defined for that country, but if not then its much better to just have the drop down appear as a text input instead of having a new text input appear.</p>
  
  <p>So can I dynamically change the dropdown to be a text input if there are no choices?  And, can it default to being a text input if there's no JavaScript enabled?</p>
  
  <p>I see this question:  <a href="https://stackoverflow.com/questions/3937018/change-select-to-input-on-selection-of-country">Change select to input on selection of country?</a></p>
  
  <p>But I don't get the jQuery reference. :(</p>