Does someone knows how can I change the container for my drop down box?
I have 3 “TD” tags and I would like to move the drop down between them, using client side code.
Does someone knows how can I change the container for my drop down box?
Share
Do you mean you want to go from something like this…
To this?
If so, you’d best tag this question JavaScript… and get rid of “object” an “container”. What you’re looking for is the Document Object Model and DOM Scripting. Given that I’ve given those
<td>elementsidattributes, I could write some JS like this:This is the quickest and cheapest answer, but you’ll want to read a little bit more about other DOM features offered by JavaScript such as
getElementById(...),getElementsByTagName(...),childNodes,addChild(...),removeChild(...),replaceChild(...)…If you want this to happen when the user does something (clicks a button let’s say) you’ll also want to read about JavaScript event handling.