javascript - OnSelectedIndexChanged not firing once deployed -


I'm not the first to choose, the on-selected index is not firing in IE, once deployed:

  • And much more.
  • Here's my code:

      & lt; Asp: Dropdown List ID = "MyDropDownList" Runat = "Server" & gt; & Lt; Asp: ListItem text = "life" value = "1" /> & Lt; Asp: ListItem text = "universe" value = "2" /> & Lt; Asp: ListItem text = "everything" value = "42" /> & Lt; / Asp: DropDownList & gt;  

    More:

    Secure Override Zero OnInit (EventArgs e) {MyDropDownList.AutoPostBack = true; MyDropDownList.SelectedIndexChanged + = New EventHeader (MideropdownListSactedEndended); } Protected Zero MyDropDownListSelectedIndexChanged (Object Sender, EventArgs e) {// Many Things}

    Now we move the results into HTML .

    Here's with Chrome, (or IE with compatibility mode):

      & lt; Select name = "MIDOPRODOWNIST" onchange = "javascript: setTimeout ('__ doPostBack (...)', 0)" ID = "MyDropDownList" & gt; & Lt; Option value = "1" selected = "selected" & gt; Life & lt; / Options & gt; & Lt; Option value = "2" & gt; Universe & lt; / Options & gt; & Lt; Option value = "42" & gt; Everything & lt; / Options & gt; & Lt; / Select & gt;  

    And here it is with IE10 / IE11 (without compatibility):

      & lt; Name name = "MyDropDownList" id = "MyDropDownList" & gt; & Lt; Option value = "1" selected = "selected" & gt; Life & lt; / Options & gt; & Lt; Option value = "2" & gt; Universe & lt; / Options & gt; & Lt; Option value = "42" & gt; Everything & lt; / Options & gt; & Lt; / Select & gt;  

    Wonder!
    onchange attribute gone !

    OK ...
    Now I know why the incident is not firing from IE.
    ... but why is it explained in a different way?

    Important Details: This is posted only once on the server (I believe it is IIS 6). Locally, it works fine.

    Another important detail: Installing any kind of patches is unfortunately not an option for me.

    Why do not you do this:

      & asp: dropdown list ID = "MyDropDownList" runat = "server" autopostback = Indexes selected on "right" switch = "MyDropDownListSelectedIndexChanged" & gt; & Lt; Asp: ListItem text = "life" value = "1" /> & Lt; Asp: ListItem text = "universe" value = "2" /> & Lt; Asp: ListItem text = "everything" value = "42" /> & Lt; / Asp: DropDownList & gt;  

    and on the server side:

      Protected Zero MyDropDownListSelectedIndexChanged (Object Sender, EventArgs E) {// do stuff here}  

    Comments

    Popular posts from this blog

    ios - How do I use CFArrayRef in Swift? -

    eclipse plugin - Run java code error: Workspace is closed -

    c - Error on building source code in VC 6 -