How to capture input value while user gives using ctrl+v???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gsuns82
    New Member
    • Mar 2007
    • 58

    How to capture input value while user gives using ctrl+v???

    Hi all,
    Is it possible to read the input value given by the user by ctrl+v,how do we use java script to read the input?

    example: If the user selects a value using ctrl+c from some where and enters the value in my form's text field using ctrl+v ,how to fetch this value using javascript?

    Thanks in Advance,
    Sundar
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    like any other input:
    Code:
    var text = [I]input_element[/I].value;

    Comment

    • gsuns82
      New Member
      • Mar 2007
      • 58

      #3
      How to capture input value while user gives using ctrl+v???

      nope,it cant help me,i want to capture the user input when he/she uses ctrl+v,i have given an example

      Regards,
      Sundar

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        Originally posted by gsuns82
        i want to capture the user input when he/she uses ctrl+v
        why trying to get crtl+v if you can get the content from the element, where this content was just pasted much easier?

        Comment

        • gsuns82
          New Member
          • Mar 2007
          • 58

          #5
          can u give me some samples?

          can u give me some sample code???it would be great if it could get the value while the user pastes it.

          Regards,
          Sundar

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            Originally posted by gsuns82
            it would be great if it could get the value while the user pastes it.
            I don’t think it’s necessary to get the value while it is pasted. once it was pasted it’s just as if it were typed in, so you can coose your favourite event (change, blur, submit, keyup, …)

            Comment

            • gsuns82
              New Member
              • Mar 2007
              • 58

              #7
              fixed using clipboard

              This is the requirement,if i let the white space along with the input that will be taken in account for the maxlength,so thr is no any other goes....anyway i have fixed it using clipboard

              Regards,
              Sundar

              Comment

              Working...