input

HTML - input value kept after Refresh

Usually, when a refresh is made on an HTML page, the values for input fields are kept (unless you do Ctrl+F5). Is there a header or other type of setting than can change this behavior, without chaging anything on the form or input itself? I have a site where the input value is not kept after a page refresh in Production. However I do n...

How to get values of <input type="checkbox" /> that are checked?

There are multiple <input type="checkbox" value="..." /> in the page. I need to get each of the <input> that is checked to do some operation. I'm using jQuery. ...

Converting drop-down select input to radio buttons which require one to be chosen

I'm using an e-commerce system which allows you to have several variations for each product - (for instance: large, medium, small t-shirts). However, we are having complaints from customers who add a t-shirt and ignore the variation. As a result, a lot of big people are getting small t-shirts (the default). To solve this, I'd like to for...

Is it redundant to use the "name" attribute for input fields in modern web development?

Hello, I've noticed a lot of websites with form(s) containing input fields whose "name" attribute is specified even if it isn't used for styling or scripting purpose! Moreover, according to the official document about the form in HTML document ... name = cdata [CI] This attribute names the element so that it may be referred to ...

return type of input with jquery

I have a form with dynamically created form elements. I need to get the value of each element, and send an ajax request to make sure the data is ok (the easy part). I can get each elements value easy enough, but the problem comes in with radio buttons. For example: <input type = 'radio' class = 'form_element' value = '1'> <input type =...

Reading from a textfile into an array into the C programming language

How do I read into an array a string with space in it, delimited with semicolons from a textfile in the C programming language? ***from textfile*** "My Record; My Second Record; My Third" . . . fopen ... for(i = 0; i < 3; i++) { fscanf_s(myFile, "%s", myRecords[i].title); /* this want read the records */ } fclo...

Reading different data from a textfile delimited with semicolons in C.

How do one read different records of data that are separated with semicolons into an array in C? from textfile: Text One; 12.25; Text Two; 5; Text Three; 1.253 fopen ... for(i = 0; i < nrRecords; i++) { fscanf(myFile, " %[^;];", myRecords[i].firstText); /* Ok first text*/ fscanf(myFile, "%lf", &myRecords[i].myDouble1); /* But goes...

Check if a key is down?

Is there a way to detect if a key is currently down in JavaScript? I know about the "keydown" event, but that's not what I need. Some time AFTER the key is pressed, I want to be able to detect if it is still pressed down. P. S. The biggest issue seems to be that after some period of time the key begins to repeat, firing off keydown and...

Can't select text in input box on IE

I have an input box that is inside of a div, the div has a background image and the input box inside of it is positioned and limited in size / font to work nicely with the background image. In FF everything works as expected, in IE though there is a major issue. I can't select the text inside of the input box using the mouse or use sho...

input on focus or tab key pressed, move to center of screen

I have a number of form fields spanning over the page fold. When pressing the "tab" key to step through each input/select field it sits the next field on the bottom of the page fold. A few of my fields have tool tips, validation responses and auto suggest boxes that appear below the field. When tabbing to the field, you can't see these ...

Trigger event of auto popup list selection via javascript

I have previously entered value 1111, 1222, and 1333 into a HTML text input. Now if I enter 1 to the text input, it should popup a list with value 1111, 1222, and 1333 as available options. How do you trigger an event when any one of these options is selected? I have a javascript function that performs a calculation on values entered in...

JS Events: hooking on value change event on text inputs

Hi all, I have a text input that its content is changed by a script not by user. So I would want to fire an event when the value changes. I can't find a suitable event for that. I event found this on StackOverflow but is not the solution I'm looking for. How to make this work with jQuery and a text input where the value is set like thi...

Getting user input from Win32 C++. WPARAM casted as int?

I'm working on a pre-existing codebase and I'm looking to have the user type any 1-2 digits followed by the enter key at any time during the code being run and pass that number to a function. Currently, user input is handled like so: LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent...

Copying INPUT FILE value to INPUT TEXT with click in jQuery

I would like to copy the value of a input:file to input:text. I can do it with plan JavaScript but I will like to know how to do it with jQuery. ----JavaScript // This what the script would look like with plain JavaScript // It works fine. I just woulld like to know who to do it with jQuery. function fakeScript() { var filepath; file...

Cakephp comment form input keeps the same value after i press add

Hello, I've created a blog site from "Beginning CakePHP from novice to professiona"-David Golding. I have the comment view listed below: <div class="comments form"> <?php echo $form->create('Comment');?> <fieldset> <legend><?php __('Add Comment');?></legend> <?php echo $form->input('name'); echo $form->input('cont...

find value in a.txt , put it as an input in b.txt using batch

Hi guys, I am looking for your help on the following. I am going to read a value in a.txt, and put it as an input for b.txt The problem is, in a.txt, the value will keep changing due to iteration process. So, it is better to point a pointer to WHERE the value will appear. Ex. (as in a.txt file) X = 12345 so, i would like to point wh...

Comparing user input integers to dictionary values? (Python)

Hey everybody, I'm a python noob and I'm trying to write a program that will show a user a list of phone numbers called greater than X times (X input by users). I've got the program to successfully read in the duplicates and count them (the numbers are stored in a dictionary where {phoneNumber : numberOfTimesCalled}), but I need to comp...

.NET: Inject Data into Input-Buffer of Process

Hi * I need to automate an command line application. It asks the user to enter a password. All my approches to send the password via STDIN failed. Now I am trying to do this with an wrapper-programm using .NET. I am starting the application creating a new process, setting the StartInfo-properties and then start the process: Dim app_pa...

Disable Opera's autocomplete

Hello! Opera's autocomplete function draws a yellow border around text inputs where it saved data. Is there any way to disable it programmatically? Here's a picture to illustrate it: ...

Label for password field

<input type="text" value="useraname" /> <input type="password" value="password" /> I'm using jQuery to make the inline labels disappear on click/focus. Password shows bulls as usual, but I wonder if its possible somehow to show "Password" label as text (instead of ••••) inside the password field? Edited to add: I want the user-typed p...