how to update two input boxes in jquery

i create two input text fields , one for title and another for permanent link

i need to update the second filed automatically when user is typing the tilte

Read More

how can i do such a thing in jquery /php

somehow im looking for a way to simulate wordpress creation of permanent link in post section

Related posts

Leave a Reply

3 comments

  1. $('#first_input_id').bind('keydown', function(e){
         var inputmirror = $('#second_input_id');
         inputmirror.val(inputmirror.val() + String.fromCharCode(e.which));
    });
    

    Something similar to this should do it.

  2. Write a function to read from the current input, munge it however you like, and insert it into the other input.

    Then bind that function to the keypress and change events.

  3. You can intercept keyup event on the first input text, and then update the output of the second input:

        $('#titleInput').keypress(function(e) { alert ('typed' + String.fromCharCode(e.keyCode))//update your 2nd input text... 
    }