• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 67749
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic