Results 1 to 9 of 9

Thread: [RESOLVED] How to do a vertical and horizontal line?

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2010
    Posts
    3

    Resolved [RESOLVED] How to do a vertical and horizontal line?

    Hello! I'm trying to do something, but without sucess.

    How to do a vertical and horizontal line centered on mouse pointer, but using javascript?

    Anyone knows any code that do this? Or where can I find it?

    I will appreciate any help.

    Thanks!

    Alan

  2. #2
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    1,023

    Re: How to do a vertical and horizontal line?

    edit: i don't know why but i didnt get the part of the mouse pointer.. but css would be enough

    Edit: didn't notice you're new, welcome to the forums
    if you got what you needed then please mark the thread as resolved by going to thread tools and mark thread as resolved.
    Last edited by Justa Lol; Feb 3rd, 2010 at 10:40 AM.

  3. #3
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: How to do a vertical and horizontal line?

    I assume you mean like having a crosshair cursor.

    If you Google "Crosshair cursor + javascript", you'll find tons of examples on how to do what you need.

    For example: http://www.webtoolkit.info/javascrip...om-cursor.html

  4. #4
    Frenzied Member
    Join Date
    Apr 2009
    Location
    CA, USA
    Posts
    1,516

    Re: How to do a vertical and horizontal line?

    Ugh, folks - CSS! Javascript should only ever happen for things you can't do with ordinary markup and styling.
    Code:
    body{cursor:crosshair;}
    Are you familiar with CSS, iuky? If not, I will definitely explain the above in more depth.

  5. #5
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: How to do a vertical and horizontal line?

    Quote Originally Posted by SambaNeko View Post
    Ugh, folks - CSS! Javascript should only ever happen for things you can't do with ordinary markup and styling.
    Code:
    body{cursor:crosshair;}
    Are you familiar with CSS, iuky? If not, I will definitely explain the above in more depth.
    I had always thought the cursor property didn't work in Firefox, but looking into it I can't find any documentation on that.

    Do you know if there was ever an issue for it? I coulda swore there was once upon a time.


    *edit* ah, it seems it is only for certain values that it fails. Crosshair is one that works across all browsers.

  6. #6
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    1,023

    Re: How to do a vertical and horizontal line?

    only custom cursors don't work, the system cursors will work, i mean those who are selected as default for pointer, link, crosshair... whatever..

  7. #7

    Thread Starter
    New Member
    Join Date
    Feb 2010
    Posts
    3

    Smile Re: How to do a vertical and horizontal line?

    Quote Originally Posted by kfcSmitty View Post
    I assume you mean like having a crosshair cursor.

    If you Google "Crosshair cursor + javascript", you'll find tons of examples on how to do what you need.

    For example: http://www.webtoolkit.info/javascrip...om-cursor.html

    Well, not just a small crosshair, but a vertical and horizontal line, centered on mouse cursor, that extends until touch the web page's borders.

    It's is a lot useful in grid pages when you have a lot of scheduled activities on rows and dates on columns.

    Thanks guys!

  8. #8
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: How to do a vertical and horizontal line?


  9. #9

    Thread Starter
    New Member
    Join Date
    Feb 2010
    Posts
    3

    Re: How to do a vertical and horizontal line?

    Thanks everybody and thanks Kows, it's exactly what I want.

    Bye!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width