hybernate20
05-15-2009, 12:32 AM
Hello,
I hope that I'm in the correct forum for this...
I'm having a bit of trouble getting something to work with IE that works just fine with Firefox (big surprise there) and I was wondering if there was a better way to do it.
Basically, I'm just editing the innerHTML of a div element to add an input box for a form as long as a checkbox is checked. When I load the page everything is where it should be. I check my checkbox, the text field appears where I want it and everything is going well. When I uncheck the checkbox, I do a "elem.innerHTML="" to try to blank out the div contents. In firefox this works well... the DIV goes back to being empty and everything shifts back up to where it should be. For IE however, the text field disappears, but everything below it stays where it is... the DIV is empty but it is still holding its place in the page.
Is there a better way for me to do this? I could append and remove the element as a child, but that just seems like overkill for what I am trying to do here. Should I just do that, or is there a way to make IE work with my method?
Thanks,
I hope that I'm in the correct forum for this...
I'm having a bit of trouble getting something to work with IE that works just fine with Firefox (big surprise there) and I was wondering if there was a better way to do it.
Basically, I'm just editing the innerHTML of a div element to add an input box for a form as long as a checkbox is checked. When I load the page everything is where it should be. I check my checkbox, the text field appears where I want it and everything is going well. When I uncheck the checkbox, I do a "elem.innerHTML="" to try to blank out the div contents. In firefox this works well... the DIV goes back to being empty and everything shifts back up to where it should be. For IE however, the text field disappears, but everything below it stays where it is... the DIV is empty but it is still holding its place in the page.
Is there a better way for me to do this? I could append and remove the element as a child, but that just seems like overkill for what I am trying to do here. Should I just do that, or is there a way to make IE work with my method?
Thanks,