radalin Posted November 3, 2006 Share Posted November 3, 2006 Hi,I have a problem with a select box. I have created two select boxes and then two buttons with add and remove functions. The thing is my function works flawless in FF and Opera but it doesn't in IE. Instead of removing selected option it removes all of the select box.[code]function addinfo(from,to){ var i = from.selectedIndex ; var myOption = document.createElement("OPTION") ; myOption.value = from.item(i).value ; myOption.text = from.item(i).text ; to.options.add(myOption) ; from.remove(i) ; }[/code]Here is the function. It takes two select boxes as arguments. There is something that I miss, but can't see it. Quote Link to comment Share on other sites More sharing options...
fenway Posted November 4, 2006 Share Posted November 4, 2006 Sounds like "i" isn't the same in both browsers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.