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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:46:32+00:00 2026-05-11T12:46:32+00:00

I am performing a jQuery .ajax() call that returns a List<string> of IP addresses

  • 0

I am performing a jQuery .ajax() call that returns a List<string> of IP addresses on a specified subnet. I use a [WebMethod] on an .aspx page to return the values. ASP.NET’s built-in JSON serializer does the magic to return the actual JSON used in my Javascript.

I have profiled the the server-side time, and it takes about 8 msec to populate and return the list, so the server-side code is not the issue.

However, when the Ajax call is initiated, in Internet Explorer it can take upwards of 3 seconds to populate a listbox with a small list of IP addresses returned. In Firefox, the listbox is essentially populated instantly.

I’m not entirely certain where the bottleneck could be. My best guess is that the fault lies with IE6’s javascript engine, but even so, adding only 255 list items should not take this much time.

Can anyone point me in the right direction as to why this is happening?

Example Code

$.ajax({           type: 'POST',           url: $('Example.aspx/GetIPsOnNetwork',           data: '{NetworkID: ' + networkID + '}',           contentType: 'application/json; charset=utf-8',           dataType: 'json',           success: function(data) {             $('#ipAddresses').empty();             // Loop through each IP address and add it to the listbox             $.each(data.d, function(){                 var ip = this.toString();                 $(document.createElement('option')).attr('value', ip).text(ip).appendTo('#ipAddresses');             });           },           error: function(msg) {             alert('Error: ' + msg);           }         }); 
  • 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. 2026-05-11T12:46:32+00:00Added an answer on May 11, 2026 at 12:46 pm

    It could be a rendering issue. try this

          success: function(data) {         // Loop through each IP address and add it to the listbox         var list = $('<select />');         $.each(data.d, function(){             var ip = this.toString();             list.append($('<option />').val(ip).text(ip));         });         $('#ipAddress').empty().append(list.find('option'));       }, 

    Basically, what you’re doing is loading the options into a dummy list, then you’re adding the contents to the ipAddresses list.

    The other thing that I changed was the document.createElement(...). If you look at the internals of $('<option />') it performs the createElement for you.

    Finally I choose to append the data to the list instead of calling option.appendTo('#ipAddress'), which would have to find the ipAddress element every time.

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

Sidebar

Related Questions

Here is my code in my jquery/javascript that is performing the ajax request... else
It appears that both jQuery and ASP.Net MVC have ways of performing AJAX functions.
before i start of with anything i know that jQuery and Ajax are the
I have a form being AJAX'd in by jQuery on a page with multiple
I am performing a simple AJAX() request using Jquery (Google hosted 1.7.1 jquery.min.js code)
I've got a CFC performing a query via AJAX to get a list of
I am performing asynchronous HTTP (Ajax) requests via jQuery with the basic $.ajax(). The
My application is performing poorly with jQuery's slideDown and slideUp. I'm looking to use
I am performing the jquery POST correctly, however I would like to call another
I am attempting to display a dialog to user while performing an AJAX call

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.