Score:0

Value does not return if #codename using javascript ajax

tj flag

If I press the Tab key, I want to display the value of the next cell using javascript and ajax.

This is my HTML code:

<input type="text" name="ccode" id="target" class="td-size" autocomplete="off" onchange="get(this.value);">
<input type="text" name="cname[]" class="td-size code_name" id="codename">

javascript code

<script type="text/javascript">
        function get(val){
            $.ajax({
                url: "ajaxData.php",
                type: "POST",
                data: 'ccode='+val,
                success:function(data){
                    $('#codename').html(data);
                    alert(data);
                    
                }
            });
        }
    </script>
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.