473,395 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

inserting text

Is there an example somewhere of a function
that will take 2 parameters: text and a text
object (input type=text or textarea) and insert
that text using the current selection point(s)
for the specified object. The cursor should end
up where you would expect it to and it should
work in both IE and other popular browsers. Is
something like that already floating around?

Thanks.
Dean Hoover

Jul 23 '05 #1
4 1278
In article <Kz******************@twister.nyroc.rr.com>, dhxyz2010
@yahoo.com enlightened us with...
Is there an example somewhere of a function
that will take 2 parameters: text and a text
object (input type=text or textarea) and insert
that text using the current selection point(s)
for the specified object. The cursor should end
up where you would expect it to and it should
work in both IE and other popular browsers. Is
something like that already floating around?


MSIE for Windows, yes. All other popular browsers, including Safari,
Konqueror, Mozilla, IE/Mac, and Opera, no, I don't think so. Last I
checked there was a problem with getting the position of the cursor in
some of those.
Maybe someone has found a way. I'll be watching this thread. :)

--
--
~kaeli~
If that phone was up your a$$, maybe you could drive a
little better!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2


Dean A. Hoover wrote:
Is there an example somewhere of a function
that will take 2 parameters: text and a text
object (input type=text or textarea) and insert
that text using the current selection point(s)
for the specified object. The cursor should end
up where you would expect it to and it should
work in both IE and other popular browsers. Is
something like that already floating around?


See
http://www.faqts.com/knowledge_base/.../13562/fid/130

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #3
Martin Honnen wrote:


Dean A. Hoover wrote:
Is there an example somewhere of a function
that will take 2 parameters: text and a text
object (input type=text or textarea) and insert
that text using the current selection point(s)
for the specified object. The cursor should end
up where you would expect it to and it should
work in both IE and other popular browsers. Is
something like that already floating around?

See
http://www.faqts.com/knowledge_base/.../13562/fid/130

Good one. Thanks.

Jul 23 '05 #4
Martin Honnen wrote:


Dean A. Hoover wrote:
Is there an example somewhere of a function
that will take 2 parameters: text and a text
object (input type=text or textarea) and insert
that text using the current selection point(s)
for the specified object. The cursor should end
up where you would expect it to and it should
work in both IE and other popular browsers. Is
something like that already floating around?

See
http://www.faqts.com/knowledge_base/.../13562/fid/130

I am trying to use what you pointed out to me (cool stuff)
in conjunction with a DHTML menu package I purchased from
apycom.com. The script you gave me fails when used with that
package (on IE only) because the line:

if (range.parentElement() == input)

ends up being false. This is clearly some interaction
with the DHTML menus I am using. I don't really understand
much about these selection objects, as I am reading up on them
in "Dynamic HTML". Is there some way to reset things when this
function is called from the DHTML menu such that it will work
like it does with the example HTML?

Thanks.
Dean Hoover

Jul 23 '05 #5

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

Similar topics

1
by: pmud | last post by:
I have an ASP.NET web application using C# code. I am trying to insert values from a web form into an SQL database. I am using SQL COMMAND object for this. I need to know HOW TO INSERT THE RADIO...
1
by: ing42 | last post by:
I have a problem with inserting records into table when an indexed view is based on it. Table has text field (without it there is no problem, but I need it). Here is a sample code: USE test GO...
3
by: rcoco | last post by:
Hi, I want to share this problem. I have a datagrid that will help me Insert data into sql database. So I made a button On my form so that when I press the button a new row on datagrid should be...
2
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
5
by: atlanteavila | last post by:
Hello all, I have a problem with inserting text with quotes, or html code in to a MYSql Database. I've been trying to create my own content management system, and unfortunately I've come accross a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.