Sorr, I made mistake, there are two wrong coding

No.1, onclick="doCopy()"
No.2,
$("#user2_name").val($("#user1_name").val())

> $("#user2_pass").val($("#user1_pass").val())



On Tue, Oct 20, 2009 at 10:28 AM, ReynierPM <rper...@uci.cu> wrote:

>
> Bi Jing wrote:
>
>> HTML code:
>>
>> <input type="checkBox" onclick="doCopy"/>Copy
>>
>> <form id="user1">
>> <input type=text id=user1_name />
>> <input type=text id=user1_pass />
>> </form>
>>
>> <form id="user2">
>> <input type=text id=user2_name />
>> <input type=text id=user2_pass />
>> </form>
>>
>>
>> JS code:
>>
>> function doCopy(){
>> $("user2_name").val($("user1_name").val())
>> $("user2_pass").val($("user1_pass").val())
>> }
>>
>>
> Isn't working.
>
> HTML Code:
> <label for="same" class="first">Same <input type="checkbox" name="same"
> id="same" onclick="doCopy" /></label>
>
> <label for="first_name" class="first">First Name: <input type="text"
> name="first_name" id="first_name" value="" size="" /></label>
> <label for="first_name1">Middle Name: <input type="text" name="first_name1"
> id="first_name1" value="" size="" /></label>
>
> JS Code:
> function doCopy(){
>  $("first_name1").val($("first_name").val())
> }
> Where is the error?
> --
> Saludos
> ReynierPM
>

Reply via email to