I'm trying to take the input from one text input field to the next and
I'm not sure how to do it through jQuery. Can someone please send me a
tutorial or example of how to do so?

Right now I have:

$(document).ready(function()
{
        $("#agentfirstname").change(function()
        {
                // take the content from #agentfirstname, set it to lowercase 
and
place it in
                // the text field #agentusername
                
$("#agentusername").val($("#agentfirstname").text().toLowerCase());
                alert('Here');
        });
});

Where I am trying to take the input from #agentfirstname and put it in
#agentusername. What functions am I to use in jQuery? Should I be
using toLowerCase()? The alert appears to work, so I know jQuery is
capturing the .change, I just need to know how to manipulate input
fields.

The HTML looks like so:

<input type="text" name="agentfirstname" id="agentfirstname"
class="textfield" tabindex="2" />
<input type="text" name="agentusername" id="agentusername"
class="textfield" tabindex="5" />

Thanks for all your help!

Reply via email to