Datalist not displaying options in Chrome browser

I sent a server request to retrieve street names, expecting them to appear as options in a datalist. However, in Google Chrome, they did not display correctly. On the other hand, Firefox and IE showed the correct street names. Here is the code snippet:

Here's the HTML:

      <li>
                <label>Street <span class="required">*</span></label>
                <input id="input_strasse" type="text" value ="Strasse" autocomplete="off" list="input_strasse_datalist" class="field-long" placeholder="Street" />
                <datalist id="input_strasse_datalist" ></datalist>
            </li>

Javascript:

  $(document).on("keyup", "#input_strasse", function () {

            var inputStr = $('#input_strasse').val();
            var charStr = inputStr.charAt(0).toUpperCase() + inputStr.substr(1);


            var UrlToWebservice = window.localStorage.getItem("url_to_webservice");
            console.log("string: ", charStr)

            $.ajax({

                type: 'POST',
                url: UrlToWebservice + 'SP_SELECT_Strassen',
                data: { 'charStr': charStr },
                crossDomain: true,
                dataType: 'xml',
                success: function (response) {
                   
                  //  var strassen = new Array;


                    $(response).find('STRASSE').each(function () {


                        var strasse = $(this).find('NAME').text();

                        var plz = $(this).find('PLZ').find('plz').text();

                        var ort = $(this).find('PLZ').find('ORT').text();

                        var arstrasse = $(this).find('AR').first().text();
                        console.log("arstrasse ", arstrasse)

                        $("#input_strasse_datalist").append('<option data-ar = ' + arstrasse + ' value = "' + strasse + ' (' + plz + ', ' + ort + ')">' + strasse + ' (' + plz + ', ' + ort + ')</option>')
                        
                        $("#input_plz").val(plz)
                        $("#input_ort").val(ort)

                    })

                },

                error: function () {
                    window.location.hash = "httperror";
                }
            })



        })

I discovered that the user-agent gives datalist display: none. When I changed the datalist display to block, it appears like this:

https://i.sstatic.net/CxXKi.png

However, it should look like this: https://i.sstatic.net/hU1GN.png

The strange thing is that it works fine on the local version of the app. The odd behavior only occurs when I run it on the server in Chrome. I'm at a loss here. Please assist. Thank you!

Answer №1

After installing the latest Chrome update, everything seems to be functioning properly.

I'm happy to report that Version 63.0.3239.84 has resolved any issues I was experiencing.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to implement a prev.next function in an image gallery using an array in JavaScript?

In the image gallery, you can simply click on each image to view a larger version. The enlarged image sources are pulled from the background-image of the smaller images. What I am aiming to achieve is the addition of previous and next buttons for easy navi ...

Swap out the string variable when it is modified

To generate a string inside the "code" variable that combines the selected image values, the final code should appear similar to: "test1/A=1a/B=1b" or "test2/A=1b/B=1a", etc. If the user modifies icon "A," it should replace the value in the code instead of ...

Organizing shared components into a dedicated repository

What is the best way to transfer my React components to a separate repository? I attempted moving the files to a new repo and installing them with npm using the git URL, but when I try to import them they are not functioning as expected. ...

Tips on turning off automatic positioning in Bootstrap 4.1

My dropdown list is currently quite large. Take a look at the image linked below. Image How can I address this issue effectively? I'm considering utilizing JavaScript to reposition the menu. Any guidance on how to disable auto-positioning? Check ou ...

Learn how to implement a captivating animation with JavaScript by utilizing the powerful Raphael Library. Unleash the animation by triggering it with either

My desire is to indicate this movement by triggering a mouse click or drag to the desired location. let myDrawing = Raphael(10,10,400,400); let myCircle = myDrawing.circle(200,200,15); myCircle.attr({fill:'blue', stroke:'red'}); let my ...

Tips for displaying a digital keyboard when a webpage loads on iOS Safari

While developing a website, I noticed that the virtual keyboard fails to appear when an input field gains focus during the page load process. As per Apple's policy restrictions, this functionality is not allowed. However, I am interested in finding a ...

I am trying to decide between using document.write or innerHTML to create responsive ad code for my Ad Network. Can anyone offer guidance on which option

I am in the process of creating an Ad Network from scratch and conducting market research to address existing challenges. I have learned that Google uses a code snippet like the one below to deliver ad content to users using JavaScript. (As mentioned by @ ...

What new approach should I take now that interceptBufferProtocol is outdated in order to use protocol.handle for intercepting both http and https requests

While working on my electron application, I wanted to implement a captcha harvester pop-up window. Upon searching, I found a git repository that seemed promising: https://github.com/sashapisdets/Captcha-Solver. After cloning it, I realized that it worked p ...

Issues with CSS animation functionality have been detected in the Edge browser

In this particular div, I have two spans enclosed. I've created a loader which features a circle filling up with red color repeatedly. While everything appears to be functioning smoothly in Google Chrome, there's a noticeable glitch when it comes ...

Quickly retrieve the current package version in node.js

My project is running on a node.js environment in the browser, and I have a Makefile that bundles all the code into a single file using browserify and then minifies it with (uglify-js). Instead of using Grunt or another tool, I chose to use Makefile becaus ...

The checkbox styles in Tailwind CSS seem to be malfunctioning and are not

In my Next.js project, I encountered an issue with a checkbox where certain Tailwind utility classes were not being applied. Despite trying to modify the color, background, and border properties, nothing seemed to change except for width, height, and curso ...

Angularjs search filter performance slows down significantly when handling large datasets

I am currently working on an AngularJS client application that displays data in a table using the dir-paginate directive from dirPagination.js. Here is the code snippet: <input type="text" ng-change="SomeTask()" ng-model="vm.searchKeyword" /> &l ...

What is the alternative method to obtain dynamically added options without relying on the on change or onclick event?

I have a dynamic country select box where options are added on click, but I am having trouble accessing all the options in the select box with JavaScript. When I console log the select box HTML after appending the options, I only see the originally added o ...

Stop or abort any pending API requests in Restangular

I am currently working with an API service: var SearchSuggestionApi = function (Restangular) { return { getSuggestion: function (keyword) { return Restangular.one('search').customGET(null, {keyword:keyword}); } }; }; SearchS ...

Personalizing Material-UI Components using Styled-Components

My attempt to modify the props of a material-ui Grid component using styled-components was not successful. I initially tried: const NavGrid = styled(Grid)` direction: 'row'; ` Unfortunately, this approach did not yield the desired result. T ...

HTML - Navbar and Sidebar Only Partially Spanning the Width

Hey there! I am trying to make my sidebar and navbar full width, but for some reason, they are not extending all the way. Can anyone help me figure out why? Below is the code I'm using: I have included an image to illustrate the issue: https://i.sst ...

Is there a quicker method for toggling the visibility of an html element?

Is there a more efficient method to show/hide over 20,000 DOM elements? I've noticed that using element.style.display = "none" is very slow. I suspect this is due to too many reflows in the browser. However, simply using element.style.visibility = ...

When the direction is set to rtl, special characters that are supposed to be at the

When using the direction property for a label with windows style directory paths containing backslashes, I encountered an issue. The purpose of using direction:rtl; was to display the end part (file names) of the path. However, I found that I am getting th ...

IE throwing an invalid argument error when making an AJAX request

I have a strange issue with my ajax request - it works perfectly fine in all browsers except for IE, specifically IE10! The error message I am encountering in the IE console is as follows: SCRIPT7002: XMLHttpRequest: Network Error 0x80070057, Invalid arg ...

Moving images displayed on a webpage

Is animating 5 pictures/photos a simple task? Take a look at this example: Which programming languages are recommended for achieving this effect? Thank you Tea ...