473,606 Members | 2,825 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get selected text of textbox in jscript variable?

Hello,

there is an asp.net textbox which contains some text.
<asp:textbox runat="server"> </asp:textbox>

I select some part of the text with the mouse: how can i get that part of
text in a jscript variable?

Thanks
Clem
Oct 15 '08 #1
1 2615
i think i found:
document.select ion.createRange ().text

"clem" <cl@noclem.itsc hreef in bericht
news:uI******** ******@TK2MSFTN GP05.phx.gbl...
Hello,

there is an asp.net textbox which contains some text.
<asp:textbox runat="server"> </asp:textbox>

I select some part of the text with the mouse: how can i get that part of
text in a jscript variable?

Thanks
Clem

Oct 15 '08 #2

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

Similar topics

24
77352
by: London | last post by:
Hello Can you help me. By ASP How can I get the dropdown(control'name)'s selected value? What is it's property'name?
8
12082
by: Zlatko Matiæ | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the combobox. What is the solution? Thank you in advance.
3
24251
by: Harry Simpson | last post by:
I've got a server-side textbox that receives the focus when the page loads. It has the text "Refine your Search" in the textbox. Obviously the user needs to highlight the "Refine your Search" section to replace this with thier text. I've googled and found javascript (which doesn't seem to work with the server side control). Is there a way to do this with ASPNET??
1
2510
by: maria | last post by:
Hi I hope some one can help me I have a table of type <asp:Table>. This table is filled in runtime with labels and textboxes(also server controls). I have written a function i jscript since when a user leaves on of the textbox I want to update a labels text. The problem is to refresh that text. some sample code: In the html-page <script language="jscript">
10
1903
by: Rob Nicholson | last post by:
In our application, we've added a bit of JavaScript that updates a title as the user types into a textbox. To trigger this, we patch into the "onkeyup" and "onpaste" events: FirstName.Attributes("onkeyup") = "ChangeTitle();" FirstName.Attributes("onpaste") = "ChangeTitle();" This works a treat but neither of these events fire if the user happens to enter a foreign character using the standard Windows ALT key plus numberic keypad, e.g....
6
1850
by: RFS666 | last post by:
Hello, After I posted yesterday "using C# class in jscript", I have a new problem: I have a C# class - DBResult - that contains (and other variables) a string array (and other variables), that contains data from a database query which is done in C# in codebehind. I create a jscript - script that is injected into the aspx-page. I need this to fill an activeX-control with data. I assign the string-array (and - for testing - a single...
1
1849
by: Chris Lincoln | last post by:
Hello, I can't quite seem to figure out this issue; it is specific to Firefox, as it works fine in IE. I have an iFrame within an aspx page that is passed a value in the query string (e.g. /index.aspx?query=about%20us). What happens (in IE at least!) is that upon load, a textbox is filled with the querystring and a search function is executed (search function is not an issue).
0
3557
by: rehanmomin | last post by:
Just to start off, I am writing a web application using C#. I have a Menu which is binded to an XML datasource. There are three menu items each with submenus and a textbox where I want to display the value of the selected menu item. Heres the XML datasource that I am using: <?xml version="1.0" encoding="utf-8" ?> <Home> <Menu text="Patient" description=" "> <SubMenu text="First Name" description="firstName"></SubMenu> ...
2
3260
by: s2008 | last post by:
Hello, In my page i have two textboxes and a html button. I'm using vb.net 2.0 . what i need is i want whatever text selected in the textbox1 to be hyperlinked when clicked the button... this is no problem.. i'm getting it easily.. But my problem is , if i select some text from the textbox2 and click the button it is also hyperlinked. i want only whatever text selected in the textbox1 to be hyperlnked and not in textbox2. Please tell me how...
0
8045
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
8467
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8320
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
6803
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
5994
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
5470
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
3952
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...
0
4011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.