input Questions

34

Solved

I need to make sure that a certain <input> field only takes numbers as value. The input is not part of a form. Hence it doesn't get submitted, so validating during submission is not an option...
Elsaelsbeth asked 19/12, 2012 at 12:40

5

Solved

In C++, how do you handle wrong inputs? Like, if the program asks for an integer, when you type a character it should be able to do something and then loop to repeat the input but the loop goes inf...
Nylon asked 27/4, 2012 at 11:32

4

I have an input field that should send a value to mysql and I want to set max and min values to predict a date range the user can select from. This input is a datetime-local field, because I want h...
Deutero asked 16/6, 2017 at 9:3

3

Solved

I have looked to no avail, and I'm afraid that it might be such a simple question that nobody dares ask it. Can one input multiple things from standard input in one line? I mean this: float a, b;...
Jaela asked 15/9, 2011 at 2:46

9

Solved

I have a select element which has several items. I want to change the color of its first item, but it seems the color only shows when you click on the select dropdown. What I want is to change the ...
Takara asked 12/7, 2013 at 6:39

1

Solved

If you readline() from sys.stdin, passing the rest of it to a subprocess does not seem to work. import subprocess import sys header = sys.stdin.buffer.readline() print(header) subprocess.run(['nl'...
Intrigante asked 13/4, 2023 at 5:4

4

Solved

The input element by default is size="20" if this is not defined inline or a CSS style rule is attributed to it. How do you make the default the actual size of the value? For other elements: <...
Rudderhead asked 31/7, 2012 at 20:34

4

Solved

I have an enum in my code that is the following: enum Status {In-Active, Active};. A status object is passed to a Person object as a parameter, so I want the user to enter Active or In-Active and s...
Schechter asked 9/5, 2012 at 10:54

12

Solved

I use the js library select2. This is a screenshot of what I have now: Start: Click on dropdown: Now is it possible to have an input field to start with and not directly a dropdownlist? I know ...
Hickox asked 26/11, 2013 at 16:48

16

Solved

So the code that I have so far is: <fieldset id="LinkList"> <input type="text" id="addLinks" name="addLinks" value="http://"> <input type="button" id="linkadd" name="linkadd" valu...
Asphyxiant asked 18/10, 2012 at 12:54

2

I'm attempting to write a cross-platform PHP utility for personal use, not to reinvent anything. The code will run within more or less while (true) { $key = null; $key = check_key_pressed(); if...
Danelle asked 24/1, 2015 at 18:29

3

Solved

The input in next program (using DOS.BufferedInput function 0Ah) works OK, but when I ask to show the output, DOS doesn't display anything at all. How is this possible? ORG 256 mov dx, msg1 mov ...
Bozarth asked 19/11, 2017 at 16:16

4

Solved

I am testing this component, which is simply changing its state depending on new input into the input field and setting the value of the input element to that state. function Login () { //Login Cr...
Augmented asked 7/12, 2020 at 13:17

6

Solved

I am working on a checkbox-based filter for a e-commerce. Everything works fine but when I attempt to go back via the back button, the checkboxes still checked without any checked attribute. I not...
Bysshe asked 16/11, 2015 at 8:29

2

Solved

I use prompt-sync module in my Node project. const prompt = require('prompt-sync')(); const result = prompt(message); But to keep my TypeScript code consistent I need to use import instead of re...
Caracalla asked 22/1, 2021 at 20:15

16

Solved

I have the following HTML5 input element: <input type="number"> Why does this input allow for the character 'e' to be entered in the input field? No other alphabet character is abl...
Strenuous asked 29/7, 2015 at 16:53

2

Solved

Note: The answers & comments below reflect the state of legacy browsers in 2009. Now you can actually set the value of the file input element dynamically/programatically using JavaScript i...
Onerous asked 30/11, 2011 at 8:29

13

How can I do this through the tag itself? Change type from text to password <input type='text' name='pass' /> Is it possible to insert JavaScript code inside the input tag itself to change t...
Barometry asked 1/2, 2012 at 10:7

2

Solved

so I have an input and I was trying to change the color of the placeholder, in some websites I believe I see people are changing the placeholder color I tried changing with elem.value but it doesn'...
Kettledrum asked 4/3, 2023 at 18:59

6

Solved

I'm new to using Java, but I have some previous experience with C#. The issue I'm having comes with reading user input from console. I'm running into the "java.util.NoSuchElementException&quot...
Nerynesbit asked 24/10, 2012 at 2:4

11

Solved

Does anybody know how to move the keyboard caret in a textbox to a particular position? For example, if a text-box (e.g. input element, not text-area) has 50 characters in it and I want to positio...
Lucky asked 4/2, 2009 at 17:54

5

Solved

Let's say that I ask a user for raw input and they said, "This is a message." If that raw input contained the word "message" it would perform an action after that. Could I see how this can be done?...
Santo asked 9/10, 2010 at 21:31

15

Solved

What I am looking for is how to read an integer that was given by the user from the command line (console project). I primarily know C++ and have started down the C# path. I know that Console.ReadL...
Sedulity asked 27/6, 2014 at 4:13

22

Solved

How do I put an icon inside a form's input element? Live version at: Tidal Force theme
Colchis asked 27/5, 2009 at 19:36

3

Solved

This is a two part question about input validation with one specific and another more general component. The specific: While researching the topic, I found THIS on Regular Expressions. I realize ...
Weaks asked 11/12, 2016 at 15:49

© 2022 - 2024 — McMap. All rights reserved.