Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6794025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:10:19+00:00 2026-05-26T18:10:19+00:00

My script isn’t getting data from JSON: <script type=text/javascript src=jquery-1.7.min.js></script> <script type=text/javascript> $(document).ready(function ()

  • 0

My script isn’t getting data from JSON:

<script type="text/javascript" src="jquery-1.7.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
    $('#useruname').change(function() {
        var userName = $(this).val();
        $.ajax({
            type: 'GET',
            url: 'ajaxuseradd.php',
            data: {
                uname: userName
            },
            success: function(data, status, xhr) {
                $("#fname").val(data.fname);
                $("#lname").val(data.fname);
                $("#email").val(data.email);
                });
            },
            dataType: 'json'
        })
    });
});


</script>
<form action="adduser.psp" method="get">
<fieldset>
    <label for="uname">Username:</label>
    <select name="uname" id="useruname">
<%
Random Python Code
%>

<%= options %>

</select>

</fieldset>
<fieldset>
    <label for="fname">First Name:</label>
    <input type="text" name="fname" />
</fieldset>
<fieldset>
    <label for="lname">Last Name:</label>
    <input type="text" name="lname" />
</fieldset>
<fieldset>
    <label for="email">Email:</label>
    <input type="text" name="email">
</fieldset>

Here’s the error I get:

updateAdduser is not defined
onchange()onchange (line 2)
event = change
[Break On This Error] updateAdduser(); 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:10:20+00:00Added an answer on May 26, 2026 at 6:10 pm
    1. Your IDs do not match. You have “useruname” in the html and “username” in the jquery bind.

    2. You should delete the onchange attribute in your html – you are calling a function that does not exist (which is where your undefined error comes from) and it would be redundant if it did – just use the .change() you have in script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<script type='text/javascript'> function formValidator(){ // Make quick references to our fields var username =
I'm trying to hunt down why a POST request from a C# script isn't
I was writing a simple python script to read from and reconstruct data from
I have to make an iframe element from java script so it isn't scrollable
For some reason this script isn't working in Firefox: document.onkeydown=function keypress(e) { if (e.keyCode
Script: http://keith-wood.name/countdown.htm Daily json response: items: { fajr: '5:23 am', sharooq: '7:23 am', dhur:
Does anyone know of a universal, one stop PNGFix script that isn't dependent on
I have a bash script I want to run every 5 minutes from cron...
I'm trying to run a script from the Windows XP console. (In case it's
I have a simple frame in a wxPython script that isn't refreshing like I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.