When someone clicks a button on my page I want the select menu to update with some new information without the page refreshing. Basically I'm using an iFrame to upload files to the server and I'd like to be able to update the select menu with the new files on the same page. I've done some work with DOM's before but not sure if this method would be the best solution.
IMO the best way is with AJAX. You can use Ajax.Updater class from the widely used library: prototype.js
I had a read through that whole page and while it has functions to extract info from form items on a page without refreshing it has nothing about adding new items to a select menu without refreshing the page. Thanks for the resource though.
The idea is to replace the select with a new select (including all "option" elements) obtained from your server via AJAX.
I presume you are talking about me since you've posted the same thing on 2 of my threads. The beauty of a forum is that you can leave a query or a programming problem and come back the next day to see what other people have suggested. It just so happens that Digital Point is one of the few unique forums where you can get a response within minutes of issuing the problem. I wouldn't say that anyone who is suggesting a solution should expect the thread starter to sit and wait on the replies therefor I don't understand why you have offered a solution and then removed it. I do in fact appreciate the time you took in offering your thoughts but I'm a little perplexed at why you've removed them.