sanfly Posted June 18, 2007 Share Posted June 18, 2007 Can anyone tell me why this would work in Firefox but not IE? document.getElementById('g_region').innerHTML = '<option value="NULL"> SELECT REGION ' + result; Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 20, 2007 Share Posted June 20, 2007 thats strange, its normally the other way around, javascript not working in firefox. The coding looks fine to me although I am a Javascript beginner. It could depend on what version of IE you are using. Regards ACE Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted June 20, 2007 Share Posted June 20, 2007 Your code looks fine to me. Only thing that could be wrong is that your variable result is empty or the code before this line has errors. I use javascript DOM allot and your code is correct Quote Link to comment Share on other sites More sharing options...
sanfly Posted June 20, 2007 Author Share Posted June 20, 2007 Thanks for the replies I ended up figuring it out the problem is that IE does not handle the innerHTML of Select tags properly. For some reason it loses the first <option> tag. You can get around it by using java script to add additional options individually, or do what I did and put the whole select tag inside a span tag, and change the inner HTML of that. 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.