Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. DHTML removeChild doesn't do as it's told

DHTML removeChild doesn't do as it's told

Scheduled Pinned Locked Moved Web Development
visual-studioquestion
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    D D de Kerf
    wrote on last edited by
    #1

    Hi, I'm writing a function that moves the selected options from one listbox to another. To do this, I first find the selected OPTION-elements, remove them from the SELECT-element (not from the document!) and then insert them in the other SELECT-element... But the removeChild function doesn't want to remove the selected item. // Get the selected option-tag (pFromNode is a SELECT-element, pOption is the n-th OPTION-element) pOption = pFromNode.childNodes.item(i); // pOption points to the right option. I know this, 'cause I've inspected the text of the element // This next line, though, doesn't remove the n-th OPTION-element, but ALWAYS the last one. pMoveOption = pFromNode.removeChild(pOption); Any solutions??? Structured programming vs. chaotic mind boggling

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups