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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:00:13+00:00 2026-06-08T08:00:13+00:00

I got very strange bug on IE. I used the code below to make

  • 0

I got very strange bug on IE. I used the code below to make a ajax request to get data from database and create drop down option <option> with that data. The thing is on IE the data didn’t appear properly, it’s only showing first character of data, but on other browser the data are showing correctly. I tried printing out the data as well, data are correct.
So I suspected either of my Jquery selection or append is wrong and tried appending outside the ajax call with some junk data and data are showing correctly but then again I put that code inside the ajax and its not showing again… I really out of clue now.. Can you guy plz help me with this? I have tested with FF, Chrome and safari they all working fine…

$.ajax({

    cache: false,
    type: "POST",
    url: "<?php echo $this->baseUrl(); ?>/rewards/getdiscounttype/",
    data: { esid: estore_id }

}).done(function( data ) {

    var obj = jQuery.parseJSON(data);
    jQuery.each(obj, function (i, app) {

        //alert(i+app['discount_type']);
        var sel = $('select[name=discount_type'+id+']');
        sel.append('<option value="'+app['id']+'">'+app['discount_type']+'</option>');

    });

});
  • 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-08T08:00:18+00:00Added an answer on June 8, 2026 at 8:00 am

    Working now with JavaScript!

    $.ajax({
    
    cache: false,
    type: "POST",
    url: "<?php echo $this->baseUrl(); ?>/rewards/getdiscounttype/",
    data: { esid: estore_id } 
    
    }).done(function( data ) {
        var obj = jQuery.parseJSON(data);
    
        /* clearing options with JS since jQuery cleare the select in the DOM but enter code   herenot on screen. */
        $('select[name=discount_type'+id+']')[0].options.length = 0;
        $('select[name=discount_type'+id+']').children().remove().end().append('');
    
        jQuery.each(obj, function (i, app) {
           var sel = $('select[name=discount_type'+id+']');
           sel.append('<option value="'+app.id+'">'+app.discount_type+'</option>');
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A very strange situation, I've got this code that is supposed to make an
Got a very strange problem. I've got a working copy which is from a
I've got a very strange problem recently. I have a code which processes inApp
I've got a very strange g++ warning when tried to compile following code: #include
Today I've got a stacktrace with a very strange error. Actually, I may be
I have got very big problem because I would like to get more information
I've got a very simple line of code in Objective-C: if ((selectedEntity != nil)
I've got a very strange problem and tried several solutions found in the www,
I have got a very, very strange problem in my C++ OpenGL application. I
I've got a very strange issue while parsing an external XAML file. The pre-history

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.