Armed Rebel Posted March 26, 2007 Share Posted March 26, 2007 Hi, I'm working on a spelling function that, when an incorrect word is found, it creates a dropdown box with the suggestions. When you change it, it replaces the word in the post box, and the select is replaced with the user's choice. The problem I'm having is with the replacement of the select/text. The problem being I have no idea how to do it, and I've looked everywhere with the help of google.This is all I've got (ignore the id): var c = document.getElementById("word"+id2+"."+id1); c.parentNode.removeChild(c); I had to code to add in a "text node", but that puts text in the <select> tag, so it's removed with the above code.Thanks for any help. Link to comment Share on other sites More sharing options...
aspnetguy Posted March 26, 2007 Share Posted March 26, 2007 can you post all your code? Link to comment Share on other sites More sharing options...
Armed Rebel Posted March 27, 2007 Author Share Posted March 27, 2007 I got what I wanted. I discovered the function insertBefore() which worked perfectly. Thanks though. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now