Tag Archives: select

How to set selected value of jquery select2?

Questions: This belong to codes prior to select2 version 4 I have a simple code of select2 that get data from ajax $(“#programid”).select2({ placeholder: “Select a Program”, allowClear: true, minimumInputLength: 3, ajax: { url: “ajax.php”, dataType: ‘json’, quietMillis: 200, data: function (term, page) { return { term: term, //search term flag: ‘selectprogram’, page: page //… Read More »

Select subset of characters in many lines (column selection) in Eclipse/Android Studio

Questions: How to select subset of characters in many lines (column selection) in Eclipse/Android Studio? Ideally without plugins. Shift+Alt+A seems not to be working for me either. In Notepad++ you can do it with Shift+Alt+(Arrows) or Alt+Left_Mouse (and drag to select) Please see example below (Column selection I’m after): Example http://softwareninjaneer.com/images/StreamAndColumnSelectionModes.png Visual Studio and many… Read More »

Select2 Ajax Method Not Selecting

Questions: Ok, I’m sure there’s something simple set wrong here but I’m not 100% what it is. So I am trying to use Select2 AJAX method as a way of users to search a database and select a result. The call itself is coming back with results, however it will not allow me to select… Read More »

Thread updates not available for selected client

Questions: When i open the ddms perspective i get thos message——thread updates not available for selected client.. It also tells me to use toolbar button to enable—–But i see no such button. What could be wrong. Please help out. Answers: In the DDMS perspective you should have the “Devices” window to the left (by standard).… Read More »

Does the select element have the required attribute?

Questions: Does the select element have the required attribute? Answers: Yes you can use required attribute in HTML5. But remember, first value should be empty. <select required> <option value=””>Please select</option> <option value=”first”>First</option> </select> Here you get the more example: http://dev.w3.org/html5/spec-author-view/the-select-element.html#the-select-element Questions: Answers: Yes it has a required attribute, you can use it as follows <select… Read More »

Is it possible to use HTML's .querySelector() to select by xlink attribute in an SVG?

Questions: Given: <body> <svg xmlns=”http://www.w3.org/2000/svg” xmlns:xlink=”http://www.w3.org/1999/xlink”> <a xlink:href=”url”></a> </svg> </body> Is it possible to use the HTML DOM’s .querySelector() or .querySelectorAll() to select the link inside the SVG by the contents of its xlink:href attribute? This works: document.querySelector(‘a’) // <a xlink:href=”url”/> These don’t: document.querySelector(‘[href=”url”]’) // null document.querySelector(‘[xlink:href=”url”]’) // Error: not a valid selector document.querySelector(‘[xlink\:href=”url”]’) //… Read More »

in querySelector: how to get the first and get the last elements? what traversal order is used in the dom?

Questions: in a div, have elements (not necessarily 2nd generation) with attribute move_id. First, would like most direct way of fetching first and last elements of set tried getting first and last via: var first = div.querySelector(‘[move_id]:first’); var last = div.querySelector(‘[move_id]:last’); this bombs because :first and :last were wishful thinking on my part (?) cannot… Read More »