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 8242555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:12:30+00:00 2026-06-07T21:12:30+00:00

Ok so im trying to start an ajax call after the first call has

  • 0

Ok so im trying to start an ajax call after the first call has completed. I have a form with 3 drop down menus. The first menu onload runs the script to bring back values. I then want to feed the vale into the second script and run the script to populate the second 3rd menu.

the second dropdown is populated onChange of the first. This works great. I then want the result of that feed into to third drop down. I know my external queries are right I just think the ajax is wrong. Here is my Ajax calls….

<script type="text/javascript" charset="utf-8">

jQuery(document).ready(function() {
jQuery('#networks').trigger('change');
});




function get_cities(networks)
{
$.ajax({
   type: "POST",
   url: "select.php", 
   beforeSend:  function () {
  $("#folder").html("<option>Loading ...</option>");
    },
   data: "idnetworks="+networks +"&par="+ <?php echo $row_rs_doc['parentid']; ?>,


   success: function(msg){
     $("#folder").html(msg);
   }



   });



} 
</script>
<script type="text/javascript" charset="utf-8">

jQuery(document).ready(function() {  
jQuery('#folder').trigger('change');
});

function get_sub(folder)
{
$.ajax({
   type: "POST",
   url: "select2.php", 
   beforeSend:  function () {
  $("#subfolder").html("<option>Loading ...</option>");
    },
   data: "iddocs="+folder,


   success: function(msg){
     $("#subfolder").html(msg);
   }



   });



} 
</script> 

ok here are the form fields

<select name="networks" id="networks" onChange='get_cities($(this).val())'>
   <?php create(network, networkid, netname);?>
  </select>

<select name="folder" id="folder" onChange='get_sub($(this).val())'>


</select>

<select name="subfolder" id="subfolder">


</select>
  • 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-06-07T21:12:33+00:00Added an answer on June 7, 2026 at 9:12 pm

    KISS it. Just put the second ajax call inside the success of the first one

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

Sidebar

Related Questions

I have an HTML form which contains a drop down, a tinyMCE textarea, and
I'm trying to create a bookmarklet that will start off an AJAX call to
I am really suffering here trying to get this ajax call to work, sorry
I have two issues I'm trying to work though. The first is I'm trying
We are about to start a new Web2/AJAX app and are trying to decide
I have a javascript quiz which gets question data via an ajax call to
I am trying to start learning OO JS and have one quick question (i
I'm trying to write an AJAX enabled WebControl. This is my first AJAX control
I am trying to send a json string and a variable thru ajax call
I'm trying to narrow down some weirdness going on with my AJAX calls. My

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.