prompt() into textbox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jacob

    prompt() into textbox

    How do you get a javascript prompt() box to put whatever you enter
    into the prompt box into a text box. So for example you would be
    typing in a textbox and you would want to add a word in bold, so you
    click the a button, a prompt box appears and then you enter the word
    you want in bold and then click ok and it adds it into the box where
    the cursor is within the box with the tags <b> </b> ...

    Many Thanks in advance,

    Jacob
  • KC Wong

    #2
    Re: prompt() into textbox

    > How do you get a javascript prompt() box to put whatever you enter[color=blue]
    > into the prompt box into a text box. So for example you would be
    > typing in a textbox and you would want to add a word in bold, so you
    > click the a button, a prompt box appears and then you enter the word
    > you want in bold and then click ok and it adds it into the box where
    > the cursor is within the box with the tags <b> </b> ...[/color]

    Hmm... take a look at some examples... most of them just let the user press
    a bold button and insert "<b></b>" into the textbox at the current cursor
    position, then move the cursor to between the two tags.

    It'd be much better than having to type in another pop-up dialog...


    KC


    Comment

    Working...