Skip to content Skip to sidebar Skip to footer

How To Copy A Value From One Form's File Upload Field To Another Form's Text Field?

I have one page with two different forms on it. The first form allows a user to upload and email an image file, the second form generates a URL based on the user input. In order to

Solution 1:

Just use change() handler for input type file, not keyup:

http://jsfiddle.net/nA37d/169/

 $("input[name='a1']").change(function() {
        $("input[name='b1']").val($(this).val());
    });

For input file to input file, i dont think its possible for security reason.

BTW, this code should be refactorized.

Post a Comment for "How To Copy A Value From One Form's File Upload Field To Another Form's Text Field?"