# Trouble with an Input Text Field!

**URL:** <https://forum.kirupa.com/t/trouble-with-an-input-text-field/76521>\
**Category:** flash\
**Created:** [January 19, 2005, 8:34am UTC](https://forum.kirupa.com/t/trouble-with-an-input-text-field/76521 "2005-01-19T08:34:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stylor](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@stylor](https://forum.kirupa.com/u/stylor)\
**Post date:** [January 19, 2005, 8:34am UTC](https://forum.kirupa.com/t/trouble-with-an-input-text-field/76521/1 "2005-01-19T08:34:27Z")

</div>

Can anyone help?

I am creating a “note pad” feature of an educational CD-Rom in Flash.  
The note pad allows the user to type notes into an input text field, as well as bookmark  
the current screen of the CD-Rom that they are on. The bookmark appears as a link within  
the body of text the user has typed into the text field. The input text field is set to  
HTML enabled, and the link text is added by the code:

noteBody\_txt.htmlText += “\<a href=“asfunction:displayPage,” +theSection + “|” +  
thePage + “”\>\<u\>” + pageHeading + "\</u\>\</a\> ";

Clicking the link sends the CD-Rom to the appropriate bookmarked page, and this all  
works fine, except…

The bookmark link always goes onto a new line. What I need is to be  
able to insert the bookmark link in the middle of a sentence, for example.  
I have messed around with Selection.getCaretIndex() and selection.setSelection() to no  
avail.

Can anyone think how to get the link to be added at the current insertion point and not on  
a new line? I thought that maybe the problem is that I am adding text dynamically to an  
input field, not a dynamic field?
