473,371 Members | 1,492 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,371 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 1275
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.