Client Side Scripting

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

    #1

    Client Side Scripting

    Hi there,

    I have 2 textboxes one of it is full of text and the second one is empty and ready for the uesr to type exactly the same text with the first textbox. What I want is while the user is typing on the second textbox I want to compare it with the first textbox(at the same time) and if it types a different letter I want to make his/her typing in red color.

    Is this possible?If yes, a piece of code will be helpful.

    Best wishes,

    Arda
  • Cowboy \(Gregory A. Beamer\)

    #2
    Re: Client Side Scripting

    I don't have a piece of code, but I have done this very thing before (albeit
    not to color text, but to test for "bad text" and play a sound when input).

    Look for the KeyPress event in JavaScript in a search engine and you should
    find some examples. If not, I can see if I can dig up the application I
    wrote to capture KeyPress events.
    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    *************** *************** *************** *************** **********
    Think Outside the Box!
    *************** *************** *************** *************** **********
    "Arda" <a@a.com> wrote in message
    news:e1BCNVvlDH A.2312@TK2MSFTN GP12.phx.gbl...
    Hi there,

    I have 2 textboxes one of it is full of text and the second one is empty and
    ready for the uesr to type exactly the same text with the first textbox.
    What I want is while the user is typing on the second textbox I want to
    compare it with the first textbox(at the same time) and if it types a
    different letter I want to make his/her typing in red color.

    Is this possible?If yes, a piece of code will be helpful.

    Best wishes,

    Arda


    Comment

    • Cowboy \(Gregory A. Beamer\)

      #3
      Re: Client Side Scripting

      I don't have a piece of code, but I have done this very thing before (albeit
      not to color text, but to test for "bad text" and play a sound when input).

      Look for the KeyPress event in JavaScript in a search engine and you should
      find some examples. If not, I can see if I can dig up the application I
      wrote to capture KeyPress events.
      --
      Gregory A. Beamer
      MVP; MCP: +I, SE, SD, DBA

      *************** *************** *************** *************** **********
      Think Outside the Box!
      *************** *************** *************** *************** **********
      "Arda" <a@a.com> wrote in message
      news:e1BCNVvlDH A.2312@TK2MSFTN GP12.phx.gbl...
      Hi there,

      I have 2 textboxes one of it is full of text and the second one is empty and
      ready for the uesr to type exactly the same text with the first textbox.
      What I want is while the user is typing on the second textbox I want to
      compare it with the first textbox(at the same time) and if it types a
      different letter I want to make his/her typing in red color.

      Is this possible?If yes, a piece of code will be helpful.

      Best wishes,

      Arda


      Comment

      Working...