PDA

View Full Version : innerHTML property


Darth Sensei
04-09-2007, 06:34 PM
I'm using javascript to dynamically make controls show up or disappear on a form. For some reason, if I load a control (in this case a select control) into the Div it shows up perfectly. If I load text in there, it is fine too. However, if I programmatically try to go from the select control content and cover it with text afterwards, that won't work.

If I change the content from one string to another, it works as well. I just cannot remove a control I've put down and replace it with text or "" or whatever.

I'm using the innerHTML property. What am I doing wrong?

Fumigator
04-09-2007, 10:36 PM
It would really help if you posted the code, at least the important bits, just so we can check for errors that you may have missed. It sounds like you know what you're doing, so I'm not trying to be a smart arse, it's just that I remember doing this and it working so I just want to be able to eliminate syntax errors, etc.

Also, what browser are you using? This can also make a difference, as different browsers have different implementations of Javascript (which is annoying to say the least).