• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Javascript problem moving images from one div to another

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
a wee bit from the empire
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic