html-input

How to set the value of a text input with MooTools

∥☆過路亽.° 提交于 2019-12-08 04:17:57
问题 I have just begun playing with MooTools, and I don't understand why the following happens: var input = new Element('input'); input.set('type','text'); input.set('value','this is the value'); console.log(input); results in: <input type=​"text">​ , so setting the value hasn't worked. But if I do this: var input = new Element('input'); input.set('type','text'); input.set('someValue','this is the value'); console.log(input); I get the expected result of <input type=​"text" somevalue=​"this is the

Using file input element in hta file prevents deleting selected file

自古美人都是妖i 提交于 2019-12-07 16:23:24
问题 If an input html element of type=file is used to select a file then that file cannot be deleted by the hta program. This MVCE works but doesn't use the file dialog - you have to type the filename in manually: <html> <HEAD> <SCRIPT Language="VBScript"> Sub Process Set x = CreateObject("Scripting.FileSystemObject") MsgBox "this will actually delete "& INIFile.Value x.DeleteFile INIFile.Value MsgBox "see? "& INIFile.Value &" is gone" Set x = Nothing End Sub </SCRIPT> </HEAD> <body id='body'>

Knockout event binding for input keypress causes weird behavior

China☆狼群 提交于 2019-12-07 03:45:51
问题 Long story short, I want to enable users to hit enter on an input element and certain method in my viewmodel be called. Here is my html input: <input id="searchBox" class="input-xxlarge" type="text" data-bind="value: searchText, valueUpdate: 'afterkeydown', event: { keypress: $parent.searchKeyboardCmd}"> and here is my method in vm: searchKeyboardCmd = function (data, event) { if (event.keyCode == 13) searchCmd(); }; everything works fine and searchCmd is called when I hit enter on input, but

How to append files in input type file with multiple before uploading [closed]

怎甘沉沦 提交于 2019-12-06 22:40:05
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I select 2 images and again I select 3 images second time before upload, the first two gets removed from input type file and last 3 images are still there. I know it's the default behavior of input type file, that it replaces the new files with new selected ones, but I want to keep

Inspect HTML5 date picker shadow DOM

拈花ヽ惹草 提交于 2019-12-06 18:29:46
问题 I'm trying to inspect the shadow DOM for certain HTML5 controls, like the date picker for the input type="date" and the actual suggestion dropdown list for inputs bound to a datalist . Preferably in Chrome, but other browsers will do too. I've found that by enabling the Shadow DOM setting in Chrome's inspector options allows me to inspect the shadow DOM for the actual input (which includes the ::-webkit-calendar-picker-indicator arrow to show the datepicker) but not the datepicker itself: The

Why file open dialog opens twice on clicking the button in FireFox

可紊 提交于 2019-12-06 05:59:17
问题 I have a file <input> field and a <span> decorates the input field: <span class="span5 btn btn-primary btn-file" id="chose_files_btn" onclick="filechose_button.click()">chose files <input id="filechose_button" type="file" name="fileData" size="1" style="display: none"/> </span> While the behavior of this is as I suppose in Chrome and Safari , FireFox opens two file input dialogs on clicking the button(span) . Why could happen so? I assume, that file input field is invisible and only access to

Using file input element in hta file prevents deleting selected file

淺唱寂寞╮ 提交于 2019-12-05 20:35:23
If an input html element of type=file is used to select a file then that file cannot be deleted by the hta program. This MVCE works but doesn't use the file dialog - you have to type the filename in manually: <html> <HEAD> <SCRIPT Language="VBScript"> Sub Process Set x = CreateObject("Scripting.FileSystemObject") MsgBox "this will actually delete "& INIFile.Value x.DeleteFile INIFile.Value MsgBox "see? "& INIFile.Value &" is gone" Set x = Nothing End Sub </SCRIPT> </HEAD> <body id='body'> <input type="text" name="INIFile" > <input type="button" value="Go!" onClick="Process" > </body> </html>

Knockout event binding for input keypress causes weird behavior

余生长醉 提交于 2019-12-05 07:01:08
Long story short, I want to enable users to hit enter on an input element and certain method in my viewmodel be called. Here is my html input: <input id="searchBox" class="input-xxlarge" type="text" data-bind="value: searchText, valueUpdate: 'afterkeydown', event: { keypress: $parent.searchKeyboardCmd}"> and here is my method in vm: searchKeyboardCmd = function (data, event) { if (event.keyCode == 13) searchCmd(); }; everything works fine and searchCmd is called when I hit enter on input, but the problem is that I can type nothing in input, i.e. everything I type into input is ignored. Thank

How to append files in input type file with multiple before uploading [closed]

霸气de小男生 提交于 2019-12-05 04:36:15
I select 2 images and again I select 3 images second time before upload, the first two gets removed from input type file and last 3 images are still there. I know it's the default behavior of input type file, that it replaces the new files with new selected ones, but I want to keep all the files user selects multiple times before upload. How is it possible? I am using ajax and formdata. I have face same problem like you now i have found solution for that <input type="file" id="attachfile" name="replyFiles" multiple> <!--File Element for multiple intput--> <div id="#filelist"></div> <script>

Inspect HTML5 date picker shadow DOM

自闭症网瘾萝莉.ら 提交于 2019-12-04 22:28:26
I'm trying to inspect the shadow DOM for certain HTML5 controls, like the date picker for the input type="date" and the actual suggestion dropdown list for inputs bound to a datalist . Preferably in Chrome, but other browsers will do too. I've found that by enabling the Shadow DOM setting in Chrome's inspector options allows me to inspect the shadow DOM for the actual input (which includes the ::-webkit-calendar-picker-indicator arrow to show the datepicker) but not the datepicker itself: The same goes for the datalist . It appears as these controls are not part of the input, but I also can't