This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes moving a Span around a document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "moving a Span around a document" Watch "moving a Span around a document" New topic

moving a Span around a document


Joined: Jun 19, 2004
Posts: 18
I am using document.onmousemove to move a <span> element inside the document.also inside the span i am using a close icon to hide the display of the <span>

how can i focus the <span> element, i am not able to focus the span object it is moving along with my mouse, any ways to focus the <span> element?

other any other methods to move a span in a document and focusing the span element by the mouse.
Thanks in advance
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023

Welcome to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

Perhaps you could simply change the underscore to a space.

Thanks Pardner! Hope to see you 'round the Ranch!

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12755
How are you positioning the Span object? - I need to do something similar but I'm just starting.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Focus the span element?

That is what I do not understand since a span can not be focused like a text box.


Joined: Jun 19, 2004
Posts: 18
Guys i fixed the issue, used a condition to move the mouse over the document and not to the span object.It works

wood burning stoves
subject: moving a Span around a document
Similar Threads
Transparent PNGs as backgrounds in IE
Using CSS Class for Mouse Rollover text
Question about html:image tag
IFrame Editor
Enter Key event working fine in IE but not FireFox.