473,804 Members | 3,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to keep static text from being selected


I have a table of line-style entries, much like webmail. When the user
double-clicks on a line, a box pops up to enter the data for that
entry.

The problem is, whatever word they clicked on in the table is still
selected, as if to be copied or cut. It just looks ugly.

I've seen some IE-only solutions, but none for FF.

Aug 16 '05 #1
6 3014
ASM
jonathon wrote:
I have a table of line-style entries, much like webmail. When the user
double-clicks on a line, a box pops up to enter the data for that
entry.
a prompt I presume ?
The problem is, whatever word they clicked on in the table is still
selected, as if to be copied or cut. It just looks ugly.
selection = '';
in end of prompt function for instance ?
I've seen some IE-only solutions, but none for FF.


on my idea : yes any JS clipboard copy with respectuous browsers

Only M$ allows external users (here the Webmaster)
to play with computer system (clipboard)

would have to read about hackers with this hole in secutity

--
Stephane Moriaux et son [moins] vieux Mac
Aug 16 '05 #2
ASM said the following on 8/16/2005 10:32 AM:
jonathon wrote:
I have a table of line-style entries, much like webmail. When the user
double-clicks on a line, a box pops up to enter the data for that
entry.

a prompt I presume ?


Why does it have to be a prompt? It could just as easily be a dHTML
in-page popup and serve the same purpose.
The problem is, whatever word they clicked on in the table is still
selected, as if to be copied or cut. It just looks ugly.

selection = '';
in end of prompt function for instance ?


If, and only if, selection refers to the range of selected text.
I've seen some IE-only solutions, but none for FF.

on my idea : yes any JS clipboard copy with respectuous browsers


The question had nothing to do with clipboard copy, it had to do with
deselecting a selected word.
Only M$ allows external users (here the Webmaster)
to play with computer system (clipboard)
It's nice to know that Microsoft, and every other browser vendor, has
fixed every security flaw that allows hackers into computers and that
the only security risk left is allowing webmasters to play with the
clipboard.
would have to read about hackers with this hole in secutity


"hole in security" is the ability to de-select text? Please explain.

But JS, in just about any browser, can copy text. I say any becuase
there may exist a browser that doesn't allow the dynamic copying of content.

To the OP: Look in ranges, selection and deselection, of ranges.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Aug 16 '05 #3
ASM
Randy Webb wrote:
ASM said the following on 8/16/2005 10:32 AM:
a prompt I presume ?
Why does it have to be a prompt? It could just as easily be a dHTML
in-page popup and serve the same purpose.


love that *as easily*
selection = '';
in end of prompt function for instance ?


If, and only if, selection refers to the range of selected text.


I hope so :-) (wouldn't selection be the right JS function with FF ?)
The question had nothing to do with clipboard copy, it had to do with
deselecting a selected word.


doesn't matter

--
Stephane Moriaux et son [moins] vieux Mac
Aug 16 '05 #4
ASM said the following on 8/16/2005 2:23 PM:
Randy Webb wrote:
ASM said the following on 8/16/2005 10:32 AM:
a prompt I presume ?

Why does it have to be a prompt? It could just as easily be a dHTML
in-page popup and serve the same purpose.

love that *as easily*


You made a presumption, I asked you to clarify your presumption.
selection = '';
in end of prompt function for instance ?

If, and only if, selection refers to the range of selected text.

I hope so :-) (wouldn't selection be the right JS function with FF ?)


Not of it's own without being qualified.
The question had nothing to do with clipboard copy, it had to do with
deselecting a selected word.


doesn't matter


Quite contrare, it very much matters if you go back and answer the part
of my post that you snipped.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Aug 16 '05 #5
ASM
Randy Webb wrote:
ASM said the following on 8/16/2005 2:23 PM:
Randy Webb wrote:
ASM said the following on 8/16/2005 10:32 AM:

a prompt I presume ?

Why does it have to be a prompt? It could just as easily be a dHTML
in-page popup and serve the same purpose.
love that *as easily*


You made a presumption, I asked you to clarify your presumption.


my presumption was to the OP clarifies its method not to us asking
each other : 'what you said ?'

but ...
I'm very interested in an example in dHTML popup prompt or/and confirm
wouldn't selection be the right JS function with FF ?


Not of it's own without being qualified.


found ! it is getSelection()

it very much matters if you go back and answer the part
of my post that you snipped.


My english is too poor
so you can turn of what I want to say as you need,
and I'm not sure to correctly understand what you tell.
So : no more matter (clipboards, hackers, security and so one)

--
Stephane Moriaux et son [moins] vieux Mac
Aug 17 '05 #6
jonathon wrote:
I have a table of line-style entries, much like webmail. When the user
double-clicks on a line, a box pops up to enter the data for that
entry.

The problem is, whatever word they clicked on in the table is still
selected, as if to be copied or cut. It just looks ugly.


For Internet Explorer you can "return false" in the "onselectst art"
event handler.
For Firefox (and maybe some other browsers) you can "return false" in
the "onmousedow n" event handler.

Robert.
Aug 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3739
by: Daniel Hill | last post by:
OK, I have very, VERY basic background knowledge of VB6 and have now upgraded to VB.NET and now I'm struggling to bring up the forms I want. What I am looking to do is to have a click a command button bring up a form, and to have which form is brought up determined by which item is selected in the accompanying combo box. I've gathered that you have to declare the item as a
0
2035
by: steve deno | last post by:
Does anyone know how to keep text items that are selected, mouse clicked from turning blue(highlighted)? I have query only blocks that are simply there to let the user select a row from them to display editable child records. I gave the current record attribute of background yellow so the user knows which parent they are on, but when clicked, the field gets that ugly text highlight. Any way to get rid of it?
2
13314
by: Patrick | last post by:
Hello, I have a drop down list that when a value is selected the page refreshes itself but the selected value changes back to the default value. I would like to keep the selected value after the page is refreshed. any ideas? Thanks in advance. Patrick
0
1461
by: Mike | last post by:
My original problem was solved by Bruce Dodds (Thanks!!) ORIGINAL PROBLEM I have developed an application for data enty for daily production in my factory. I have one combo box for shifts and second combo box for the "machine names".
1
1416
by: bryan | last post by:
I'm trying to write an application to demonstrate to a friend how to highlight text in javascript, only problem is he wants it to be on divs only. So say for example you have a page, and you select some text in the div (this is static text, not a form or anything) and you click "highlight" is there a way to wrap style tags around that highlighted text using javascript, without refreshing the page? thanks.
9
3632
by: Tarscher | last post by:
hi all, I have this seemingly simple problem. I have lost a lot of time on it though. When a user selects a value from a dropdownlist (static control) a dynamic control is generated. I have to create the dynamic controls in the OnInit stage of the lifecycle. Since data from static controls is not yet available in the OnInit stage I can't know what dynamic control I have to create.
9
2075
by: LamSoft | last post by:
Class B { public B() {} } Class A : B { public static string ABC = "myABC"; public A() {} }
1
8068
by: The.Daryl.Lu | last post by:
Hi, two parts to my problem if someone can help address either one or both: 1. I want to SELECT everything in the table if it matches the criteria when the query button is pressed (this is just a commandbutton on my form). The biggest problem I'm having is that I can't (don't know how) populate a combobox on static items such as "True, False, Any." The Any field, would be selected by the user to find all records where that fields is...
18
2191
by: Academia | last post by:
I let the use modify the text of a combobox and then I replace the selected item with the new text (in Keyup event). But if he sets the Text property to an empty string ("") that sets the SelectedIndex to -1. Do you have any suggestion for getting around this problem?
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9576
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10311
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9138
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7613
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5516
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2988
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.