- Create Account

ondragend without even moving

Forums > DragResize > ondragend without even moving
Author
Message

1) graham01 Group: Members
Posts: 8 Joined: 21 Feb 2008 Location: england IP: 78.86.--.--
is there a way to stop this? i want the page to be refreshed after something has been dragged or resized because the co-ordinates get saved into a database, this works fine, exept when you have to click on a div to bring up the resize handles, the page is refreshed.. so items can never be resized.

is there a way of making the ondragend function run only when something is actually moved or resized?

Thanks

2) Angus Turnbull Group: Moderators
Posts: 4235 Joined: 7 Dec 2003 Location: New Zealand IP: 203.109.--.--
Well, the script fires it on release of the element. You could simply save the element co-ordinates during ondragstart and compare them with the saved values in ondragend to see if you need to do anything?

- Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.