Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How to disable the feature to select a text

Reply
Thread Tools

How to disable the feature to select a text

 
 
Stefan Mueller
Guest
Posts: n/a
 
      12-21-2009
I've a HTML table with several columns. If you click on the header of
a column the appropriate column gets sorted.
If you move the mouse while clicking the header or you even double
click the header the text in the header gets selected.

Is there any possibility to disable this feature so that the text in
the header never gets selected?
 
Reply With Quote
 
 
 
 
Andy
Guest
Posts: n/a
 
      12-21-2009

"Stefan Mueller" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've a HTML table with several columns. If you click on the header of
> a column the appropriate column gets sorted.
> If you move the mouse while clicking the header or you even double
> click the header the text in the header gets selected.
>
> Is there any possibility to disable this feature so that the text in
> the header never gets selected?


You could place an absolute positioned div within a relative positioned div
(which contains your heading) then use a 100% height by 100% width blank
image in the absolute div as your link (onclick) anchor.

This would also have the advantage of making the entire heading container
clickable and not just the text.

If you need me to mock up a working example, let me know.


Andy

 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      12-21-2009

"Stefan Mueller" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've a HTML table with several columns. If you click on the header of
> a column the appropriate column gets sorted.
> If you move the mouse while clicking the header or you even double
> click the header the text in the header gets selected.


Yes. That is how browsers work.

> Is there any possibility to disable this feature so that the text in
> the header never gets selected?


No.

Well, acutally, not with HTML but there is a way with heaps of javascript
but why does this actually give you a problem?


 
Reply With Quote
 
Stefan Mueller
Guest
Posts: n/a
 
      12-21-2009
> You could place an absolute positioned div within a relative positioned div
> (which contains your heading) then use a 100% height by 100% width blank
> image in the absolute div as your link (onclick) anchor.
>
> This would also have the advantage of making the entire heading container
> clickable and not just the text.
>
> If you need me to mock up a working example, let me know.


Sounds great.
I'd appreciate it very much if you could post a working example.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      12-21-2009
rf wrote:

> "Stefan Mueller" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I've a HTML table with several columns. If you click on the header of
>> a column the appropriate column gets sorted.
>> If you move the mouse while clicking the header or you even double
>> click the header the text in the header gets selected.

>
> Yes. That is how browsers work.


Really? Are you sure you are referring to web browsers and not some
spreadsheet programs?

When I mouse over or click on a column header, nothing happens, unless
there's a link there, or something. If I double click on it, a word gets
selected - nothing more. If I triple click, the entire header gets selected.
Still no sorting - and I really don't expect any sorting, as how could a
stupid wowser know that the user wants to sort? How could it figure out the
sorting order?

>> Is there any possibility to disable this feature so that the text in
>> the header never gets selected?

>
> No.


Huh? How do you _enable_ it in the first place?

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      12-21-2009
Sherm Pendley wrote:

> "Jukka K. Korpela" <(E-Mail Removed)> writes:
>
>> rf wrote:
>>
>>> "Stefan Mueller" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> I've a HTML table with several columns. If you click on the header
>>>> of a column the appropriate column gets sorted.
>>>> If you move the mouse while clicking the header or you even double
>>>> click the header the text in the header gets selected.
>>>
>>> Yes. That is how browsers work.

>>
>> Really? Are you sure you are referring to web browsers and not some
>> spreadsheet programs?

>
> Get a grip. Rf is obviously referring to the selection behavior, not
> to the sorting behavior.


There's nothing obvious in it. "Rf" quoted text that discussed both things,
so it is fair to expect that he commented on both of them, not just one part
of the second thing - especially since "rf" did not in any way indicate
otherwise. In adequate quoting, you quote only the part that is necessary
for indicating what is commented on.

Besides, in normal browsers, double clicking selects a word - it takes a
triple click to select a larger part of text. For a single-word header,
there is no difference, but the discussion was at a general level, and at
the general level, the common browser behavior is that the clicked _word_
gets selected.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      12-21-2009
In article <NgOXm.54392$(E-Mail Removed)>,
"Jukka K. Korpela" <(E-Mail Removed)> wrote:

> rf wrote:
>
> > "Stefan Mueller" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> I've a HTML table with several columns. If you click on the header of
> >> a column the appropriate column gets sorted.
> >> If you move the mouse while clicking the header or you even double
> >> click the header the text in the header gets selected.

> >
> > Yes. That is how browsers work.

>
> Really? Are you sure you are referring to web browsers and not some
> spreadsheet programs?
>


The OP gave no url and it is hard to know what he was referring to,
perhaps he is somehow involved in a page with scripting? Certainly no
web browser simply sorts anything. The only other column/row sorting way
is to make things in the TH links to other html pages where the items
are differently (statically) arranged (I did this static once so people
could look at Australian towns by postcode or by alphabetical order)


> When I mouse over or click on a column header, nothing happens, unless
> there's a link there, or something. If I double click on it, a word gets
> selected - nothing more. If I triple click, the entire header gets selected.
> Still no sorting - and I really don't expect any sorting, as how could a
> stupid wowser know that the user wants to sort? How could it figure out the
> sorting order?
>
> >> Is there any possibility to disable this feature so that the text in
> >> the header never gets selected?

> >
> > No.

>
> Huh? How do you _enable_ it in the first place?


Good question and exactly what I was thinking too. OP is not telling us
something!

--
dorayme
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      12-21-2009
In article <(E-Mail Removed)>,
Sherm Pendley <(E-Mail Removed)> wrote:

....
> It's patently obvious to anyone who doesn't have a preconceived notion
> that everyone else in the world is a drooling moron, and a pathological
> need to "prove" it.
>


> Like I said - get a grip.



Sherm! This is really way out of line, you are being so horrid and
unfair! JK has done nothing at all in this thread to deserve this.

--
dorayme
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      12-21-2009

"dorayme" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In article <(E-Mail Removed)>,
> Sherm Pendley <(E-Mail Removed)> wrote:
>
> ...
>> It's patently obvious to anyone who doesn't have a preconceived notion
>> that everyone else in the world is a drooling moron, and a pathological
>> need to "prove" it.
>>

>
>> Like I said - get a grip.

>
>
> Sherm! This is really way out of line, you are being so horrid and
> unfair! JK has done nothing at all in this thread to deserve this.


Get a grip dorayme. JK is a ****ing pedantic idiot and this thread simply
proves it.


 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      12-21-2009

"dorayme" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In article <NgOXm.54392$(E-Mail Removed)>,
> "Jukka K. Korpela" <(E-Mail Removed)> wrote:
>
> >> If you move the mouse while clicking the header or you even double
>> >> click the header the text in the header gets selected.


>> Huh? How do you _enable_ it in the first place?

>
> Good question and exactly what I was thinking too. OP is not telling us
> something!


Move mouse to somewhere over some text. Press mouse button. Move mouse.
Release mouse button. Admire selected text. Pretty bloody obvious to me.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
REXML feature request: XPath.match.text & better text documentation Dan Kohn Ruby 2 09-15-2005 02:19 PM
Disable the wireless network feature =?Utf-8?B?UmFqYXNla2FyYW4=?= Wireless Networking 1 05-04-2005 01:46 AM
select of select box will select multiple in another box palmiere Javascript 1 02-09-2004 01:11 PM
Datagrid Heading (Text - Clickable) and Row Elements (checkboxes) = Select All Feature BTHOMASinOHIO ASP .Net Datagrid Control 2 11-13-2003 10:54 PM



Advertisments