disable double-click selection

Discussion in 'Javascript' started by yair, Jul 16, 2003.

  1. yair

    yair Guest

    hey all
    i have a page with a table, and when the user doubleclicks a row in
    it, a window is opened. The problem is, if he doubleclicked a text in
    the row, it's becoming selected.
    what i want is to disable the selection upon doubleclicking, but no
    the selection at all (so that the user can still just use the mouse to
    select some text in the table).
    is there a javascript command that can disable the selection currently
    highlighted?
    thanks
    yair
     
    yair, Jul 16, 2003
    #1
    1. Advertising

  2. yair

    yair Guest

    "ManoDestra" <> wrote in message news:<9OtSa.1081$>...
    > The simple answer is don't use double click. Use the click event instead or
    > add an extra column with a link in it to open a new window. I would never
    > use a double click event as it is often used in browsers for other things.
    > Not sure if setting the DoubleClick event for the window would work, but you
    > could try.
    >
    > window.ondblclick = someFunction;
    >
    > function someFunction() {
    > //Put your code here to open a new window and see if it works.
    > }
    >
    > Peter.
    >
    > "yair" <> wrote in message
    > news:...
    > > hey all
    > > i have a page with a table, and when the user doubleclicks a row in
    > > it, a window is opened. The problem is, if he doubleclicked a text in
    > > the row, it's becoming selected.
    > > what i want is to disable the selection upon doubleclicking, but no
    > > the selection at all (so that the user can still just use the mouse to
    > > select some text in the table).
    > > is there a javascript command that can disable the selection currently
    > > highlighted?
    > > thanks
    > > yair


    thanks for the response.
    i m just asking how can i unselect when a text is selected.
    yair
     
    yair, Jul 20, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Niederberger
    Replies:
    2
    Views:
    16,551
    Christian Kaufhold
    Jan 7, 2005
  2. Sydex
    Replies:
    12
    Views:
    6,528
    Victor Bazarov
    Feb 17, 2005
  3. Replies:
    0
    Views:
    377
  4. Fnord Nase

    Prevent text selection after double click

    Fnord Nase, Apr 20, 2007, in forum: Javascript
    Replies:
    6
    Views:
    199
    Elegie
    Apr 21, 2007
  5. venu madhav

    Disable double click on a table.

    venu madhav, Jun 18, 2010, in forum: Javascript
    Replies:
    2
    Views:
    121
Loading...

Share This Page