Bug Tracker

Modify

Ticket #1074 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

$.html(val) can not be used to Select Element

Reported by: clmm Owned by: john
Priority: major Milestone: 1.2.2
Component: core Version: 1.1.3
Keywords: Cc:
Blocking: Blocked by:

Description (last modified by john) (diff)

var optionStr = "<option value="-1" '''selected="selected"'''>選択</option>";
jQuery.each(fileNameArr,function(i,n){
	optionStr += "<option value=""+i+"">"+n+"</option>";
});

The option which value is "-1" will be selected as suppose. But $.html(val) look like no useless to this.

correct: document.getElementById('search-type').innerHTML = optionStr; correct: jQuery("#search-type").get(0).innerHTML = optionStr; wrong: jQuery("#search-type").html(optionStr);

Change History

comment:1 Changed 6 years ago by john

  • Owner set to john
  • Version changed from 1.1.2 to 1.1.3
  • Description modified (diff)
  • Milestone changed from 1.1.3 to 1.1.4

comment:2 Changed 6 years ago by davidserduke

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from 1.1.4 to 1.2.2

Fixed in [3844].

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.