Input field with partial-permanent value

Discussion in 'Programming' started by Site Owner, Jul 23, 2007.

  1. #1
    I want to have a textbox with the dollar sign in it that can't be deleted, but user shoud still be able to enter value. Is this possible?
     
    Site Owner, Jul 23, 2007 IP
  2. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Why not have the $ sign as text on the side of the textbox, that seems to be the common solution. Also, a problem with doing thatis unexpected behaviour, users might get confused. If you must, you will have to use JavaScript. Add a callback to the onchange or onkeypress events and check for a dollar sign and add a new one if it was deleted.
     
    krt, Jul 23, 2007 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    AstarothSolutions, Jul 25, 2007 IP