By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,939 Members | 1,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,939 IT Pros & Developers. It's quick & easy.

[scriptaculous] dragging and <input> field

P: n/a
Hi all
I have a form with a couple of input fields, embedded within spans. I am
using script.aculo.us for dragging and dropping, and want to reorder the
input fields that way. The input fields are display:inline because I
want them all on the same line.

Does anyone know of a smart trick to be able to drag these input fields?
Just setting their disabled attribute doesn't work, because then they
get no events. Not setting disabled just causes the fields to show a
text cursor when you try to drag. I have a working solution with
absolutely positioned blocks on top of the inputs, that drag the fields
with them, but I find it quite ugly.

Anyone any better suggestions?

Thanks

Bart van Deenen

Nov 25 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
> I have a form with a couple of input fields, embedded within spans. I am
using script.aculo.us for dragging and dropping, and want to reorder the
input fields that way. The input fields are display:inline because I
want them all on the same line.

Does anyone know of a smart trick to be able to drag these input fields?
Just setting their disabled attribute doesn't work, because then they
get no events. Not setting disabled just causes the fields to show a
text cursor when you try to drag. I have a working solution with
absolutely positioned blocks on top of the inputs, that drag the fields
with them, but I find it quite ugly.

Anyone any better suggestions?


You need to do for <span>'s what has been done for <div>'s with drag and
drop.

Aaron
Nov 25 '05 #2

P: n/a
On 2005-11-25, Bart van Deenen <bv******@xs-four-all.nl.invalid> wrote:
Hi all
I have a form with a couple of input fields, embedded within spans. I am
using script.aculo.us for dragging and dropping, and want to reorder the
input fields that way. The input fields are display:inline because I
want them all on the same line.

Does anyone know of a smart trick to be able to drag these input fields?
Just setting their disabled attribute doesn't work, because then they
get no events. Not setting disabled just causes the fields to show a
text cursor when you try to drag. I have a working solution with
absolutely positioned blocks on top of the inputs, that drag the fields
with them, but I find it quite ugly.

Anyone any better suggestions?


put them inside a div, the div will get events. , drag the div.

Bye.
Jasen
Nov 26 '05 #3

P: n/a
Jasen Betts <ja***@free.net.nospam.nz> wrote:
put them inside a div, the div will get events. , drag the div.

I tried it, but clicking inside the <input> element within the DIV will
still cause normal cursor handling for an input, it will not allow me to
drag the input field.
At the moment I'm just putting a padding around the input, so that you
can drag the span or div, but it would be nicer if one could drag the
whole input field around, instead of just its thick border.

Bart van Deenen
Nov 28 '05 #4

P: n/a
On 2005-11-28, Bart van Deenen <bv******@xs-four-all.nl.invalid> wrote:
I tried it, but clicking inside the <input> element within the DIV will
still cause normal cursor handling for an input, it will not allow me to
drag the input field.
At the moment I'm just putting a padding around the input, so that you
can drag the span or div, but it would be nicer if one could drag the
whole input field around, instead of just its thick border.


Maybe you could put a transparent div over (Z-index) the input field, and
make the visible one follow the covering one...

Bye.
Jasen
Dec 1 '05 #5

P: n/a
Jasen Betts <ja***@free.net.nospam.nz> wrote:
Maybe you could put a transparent div over (Z-index) the input field, and
make the visible one follow the covering one...

That works, but it's inelegant. I just hoped one of you guys/gals would
think of something elegant.

Thanks for thinking with me.
Bart
Dec 2 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.