Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Javascript problem moving images from one div to another

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Above is my code to move images from one div to another.The functionality is working fine when moving the images from
"srcImgDiv" to "destImgDiv".But when trying to move images back from "destImgDiv" to "srcImgDiv" following code snippet
is found to be create the problem (written in function moveSelectedOptions(from,to))

due to which the required array is not getting populated.

Though I am checking the checkbox before the image imgCheckbox.checked is returning false.

Can anybody please pinpoint where and why the problem is occuring?

Thanks,
Jignesh
 
Marshal
Posts: 67445
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouldn't you like to replace all that code with something like:

?

Life is too short to write Javascript without a library. Check out jQuery or one of the other JavaScript libraries to make such things a breeze.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic