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

  • Home
  • SEARCH
  • 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 6208789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:52:07+00:00 2026-05-24T05:52:07+00:00

I have a form currently has 2 drop downs. Selecting an option from the

  • 0

I have a form currently has 2 drop downs. Selecting an option from the first drop down populates the second drop down.

This works fine. I just noticed though that when I add a new item to the second dropdown that It will enter it in the database fine but it will not show up in the drop down menu in Internet Explorer. However if I completely close the browser and reopen it they new entry will show up. It almost seems like a cache type error. It works fine in all other browsers.

The code I am using is

function populateSubCategory() {

   $.getJSON('../inc_selectlogic.php', {category_id:$('#category_id').val()}, function(data) {

    var select = $('#sub_category_id');
    var options = select.attr('options');
    $('option', select).remove();
    $("#sub_category_id").append('<option value="">CATEGORY</option>');
    $.each(data, function(index, array) {
        $("#sub_category_id").append('<option value='+array['sub_category_id']+'>'+ array['sub_category_name'] +'</option>');

    });

});

}

The PHP is calls is

$dsn = "HIDDEN";
$username = "HIDDEN";
$password = "HIDDEN";

$pdo = new PDO($dsn, $username, $password);

$rows = array();
if(isset($_GET['category_id'])) {
    $stmt = $pdo->prepare("SELECT SQL_NO_CACHE sub_category_name, sub_category_id FROM sub_categories WHERE category_id = ?");
    $stmt->execute(array($_GET['category_id']));
    $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
}
echo json_encode($rows);
  • 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-24T05:52:09+00:00Added an answer on May 24, 2026 at 5:52 am

    You can work around the cache issue by adding a variable to the end of the request url that makes the request unique each time.

    var time = new Date().getTime();
    $.getJSON('../inc_selectlogic.php?time=' + time, {category_id:$('#category_id').val()}, function(data) {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a web form aspx page that calls RegisterClientScriptBlock. This sends down
I currently have a datasource from a client in the form of XML, this
I currently have form that checks if a user has unsubmitted changes when they
I have got 2 drop down list in my php form. Values in the
I have a web form that I am attempting to implement dynamic drop down
I have a simple form that has a list (dropdown list generated from a
I have a drop down which builds a form based of the selections that
I have a view called Associations that has a drop down list and a
I have an invoice form. This is a simplified version: so it has line
We currently have a form with the standard multi-select functionality of here are the

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.