简体   繁体   中英

Radio buttons not working in Internet Explorer 11

We have a web page generated by an ASP.NET web application. In this page there are several groups of radio buttons. For some users, one of these groups do not work. The first button is checked when the page loads, as expected, but nothing happens when the user clicks on one of the others. The other groups of radio buttons all work.

Here is the relevant code:

<div class="fjerdedel">
    Oprettelse <input id="Oprettelse" type="radio" name="type" value="Oprettelse" checked="checked" />
</div>
<div class="fjerdedel">
    Ændring <input id="Ændring" type="radio" name="type" value="Ændring" />
</div> 
<div class="fjerdedel">
    Tilføjelse <input id="Tilføjelse" type="radio" name="type" value="Tilføjelse" />
</div> 
<div class="fjerdedel">
    Nedlæggelse <input id="Nedlæggelse" type="radio" name="type" value="Nedlæggelse" />
</div>

There are javascript event handlers on some controls on the page, but not on these buttons.

It works in Firefox and Chrome. It works for some users using Internet Explorer 11.0.9600.14914, but not for others. It is not a question of 64 vs. 32 bits.

It does not work for me when the page is served from our production webserver, but it does work when served from a test server. The webapps on the two servers are identical. The HTML code received by the browser is identical, save for three things produced by the ASP.NET framework:

There is a hidden input containing viewstate. This content differs between production and test. And there are two script tags, where the scr-attribute includes what looks like random characters. These also differ.

I have used Fiddler to check if there is a request that fails when contacting one or the other of the servers. There is not. I have tried clearing everything in the browser. It makes no difference.

One difference between these radio buttons and the other radio buttons on the page is that these are inclosed in a floated div:

.fjerdedel {
    width: 25%;
    float:left;
}

Double clicking on a word in these divs causes the browser to highligt the next word following the divs. When the page is served from the text server, it highlights the word clicked on, as expected.

The problem proved to be browser setup. Some users had the checkbox show intranet sites in compatability view checked. The test site URL is different enough that the browser does not consider this an intranet site.

Just a suggestion. Make sure your Radio-Button does not contain any (Value="text") in aspx code section.

I encountered the same situation. After deleting (Value="text") from the aspx code, it is working fine now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM