View Single Post
  #2 (permalink)  
Old May 4th, 2008, 22:04
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 967
Blog Entries: 2
Thanks: 5
Thanked 19 Times in 17 Posts
Send a message via Skype™ to Aso
Re: ondrop code help needed please

You'd probably have to use the onmouseup event (I presume the user has to click and drag whilst holding the button down?)

When the user has released the mouse button, get the position of the element using offsetHeight and offsetWidth.

Then you can compare these results to those of the correct answer position. If they match within X pixels (so the user doesn't have to drop it in the *absolute* correct position), then they've got the answer right!
Reply With Quote