Click to See Complete Forum and Search --> : Drag and Grab text


leejay
09-12-2008, 08:18 AM
Hi,

Apologies if this is covered somewhere, and also apologies for the length of the post but I have spent the past four hours trawling the net for help, but I don't really know what to search for.

Basically, I'm building a web site that is to be used on a company touch screen, it's windows based and it simply works by registering your finger touch as a left mouse click. You can hold your finger on the screen and it drags the mouse arrow around.

I want to create a body of text that can be dragged by placing your finger/left click of mouse on the screen and dragged up or down - similar to the way an iPhone works. It needs to go in a table that has a background screen.

Is there a way in Dreamweaver to do this? I don't want the user to be able to select text by accident, so maybe I need to use a javascript or something? I found the DJScroller script earlier and tried playing with it, but it constantly scrolls and I don't want that - the text has to be static at the top of the screen and as you read it, you drag it down (or up like the iPhone - either will work!!)

Hope this makes sense, and would really appreciate some ideas. I know it is a simple thing, I just don't know how to find it!

Thanks,

Lee

Coyotelab
09-12-2008, 12:51 PM
What you need is "AJAX" drag-and-drop functionality
look in to Scriptaculous (http://script.aculo.us/), Yahoo User Interface Library (YUI) (http://developer.yahoo.com/yui/index.html), Dojo Toolkit (http://dojotoolkit.org/). All these AJAX frameworks have support for drag-and-drop. also Google Web Toolkit (http://code.google.com/webtoolkit/).

mbielski
09-12-2008, 06:53 PM
If you are looking to do drag/drop operations in a webpage, you have a couple options:

First: http://www.twinhelix.com/javascript/dragresize/demo/

This is the best example I have seen. Way Cool.

Second: http://www.webreference.com/programming/javascript/mk/column2/index.html

Cool stuff there too. But, be thee forewarned... that example depends on the browser NOT having the doctype set, and just a plain HTML tag.

leejay
09-15-2008, 04:25 AM
Many thanks for your responses guys, however I'm still not sure those sites are offering the thing I need.

I realised when reading back over my post, that the title is wrong and possibly misleading! It should be grab and drag text as opposed to drag and grab, this may have been confused with drag and drop? I can only seem to find scripts for dragging boxes and dropping them on a point in the page...

What I'm looking for is the ability to scroll text down a page in a similar fashion to Adobe Reader by grabbing it and moving your mouse down (or up) which replaces the need for a scroll bar at the right.

mbielski
09-15-2008, 11:25 AM
Um... yeah... good luck with that...

You might try looking around the various scripting websites (particularly those drag/drop ones) and see how they handle the mouse events, then see what you can do with trying to manipulate the scrollbar, which I am not sure is possible. While I can't see a need for that kind of functionality, I'm sure that's what people said about drag/drop in a web page when it was first postulated, so go for it and who knows, you might end up creating a revolution. For now, I'll stick to the handy wheel on my mouse that does it for me, or the arrow keys on the keyboard that do the same...

leejay
09-17-2008, 10:24 AM
Well thanks anyway chaps, I'll keep on looking. Because it is a touch screen it's a bit tricky to use the scroll bar at the right and unfortunately using your middle finger doesn't act like a middle button!

The same way you scroll through texts on an iPhone or a Samsung Tocco is the effect I'm looking for on a big screen. You put your finger on the screen and move it up or down and the text moves with you.

The touchscreen works by your finger touch representing a left mouse click, so the Adobe reader thing is the best way I can describe how I'd like it to work.