input

Put text input inside label for radio button?

I'm trying to make a radio group specifying a bunch of options, and an extra option "other" with a text input to specify. The code for this particular radio button I'm using is <input type='radio' name='RadioInput' value='Other' id='RadioInput_Other' /> <label for='RadioInput_Other'>Ohter: <input type='text' name='RadioInput_Other_...

taking integer input in java

I am actually new to java programming and am finding it difficult to take integer input and storing it in variables...i would like it if someone could tell me how to do it or provide with an example like adding two numbers given by the user.. ...

Calling/selecting variables (float valued) with user input in Python

I've been working on a computational physics project (plotting related rates of chemical reactants with respect to eachother to show oscillatory behavior) with a fair amount of success. However, one of my simulations involves more than two active oscillating agents (five, in fact) which would obviously be unsuitable for any single visual...

Disabling input's whith jQuery not working

Hi, I am trying to disable some inputs using jQuery 1.4.2, This is a part of the HTML code: <input type="text" disabled="disabled" name="nume" value="Text" /> And jQuery: $('.salveaza').live('click', function(e){ $.get(ajaxURL, $('form', itemCurent).serialize()+' // This is the code for disabeling inputs ...

Reading Inputs in Java - help

I am having a problem reading inputs, can anyone help me. Each line of the input have to Integers: X e Y separated by a space. 12 1 12 3 23 4 9 3 I am using this code in java but is not working, its only reading the first line can anyone help me? String []f; String line; Scanner in=new Scanner(System.in); ...

how to make a BufferedReader in C

I am really new programming in C. How can I do the same in C, maybe in a more simple way than the one I do in Java? Each line of the input has two integers: X and Y separated by a space. 12 1 12 3 23 4 9 3 InputStreamReader in = new InputStreamReader(System.in); BufferedReader buf = new BufferedReader(in); int n; int k; double sol...

Magic of scanf() function?

Why run this code and print whole string? #include <stdio.h> void main() { int a; while(a!='q') { scanf("%c",&a); printf("%c",a); } } Enter string except q, and finally press enter key. Only now your string will print on the screen. Why? ...

How can I use cout<<myclass?

myclass is a c++ class writed by me . and when I write myclass x; cout << x; // how to output is " 10 " or "20" like intger or float value ...

An alternative to reading input from Java's System.in

I’m working on the UVa Online Judge problem set archive as a way to practice Java, and as a way to practice data structures and algorithms in general. They give an example input file to submit to the online judge to use as a starting point (it’s the solution to problem 100). Input from the standard input stream (java.lang.System.in) ...

How to query an input in Python without outputting a new line

The title describes the question pretty much. ...

Delete default value of an input text on click

Hey, I have an input text : <input name="Email" type="text" id="Email" value="[email protected]" /> I want to put a default value like "What's your programming question ? be specific." in StackOverFlow, and when the user click on it the default value disapear. ...

Javascript: Make Rows Draggable Through Input Field Handles

I have created a table with draggable rows. Unfortunately, most of the rows are covered with a large textbox input element. In order to drag the rows, you have to grab the row on the very edge just outside of the textbox. Is there a way to allow the rows to be grabbed through the textboxes without destroying the textbox functionality?...

Insert default value if input-text is deleted

Hi all I have the following piece of jQuery code: $(".SearchForm input:text").each(function(){ /* Sets the current value as the defaultvalue attribute */ if(allowedDefaults.indexOf($(this).val()) > 0 || $(this).val() == "") { $(this).attr("defaultvalue", $(this).val()); $(this).css("color","#9d9d9d")...

Disable Auto Zoom in Input "Text" tag - Safari on iPhone

Hi, all, I made an html page that has an tag with type equals "text". When I click in it using Safari on iPhone, all the page becomes larger (auto zoom). Does anybody know how to disable it? Regards, Eduardo ...

radio input replacement using jquery

It may seem a bit odd to ask this since there are several solutions out there but the fact is that all of them look pretty and none of what i've seem save the input value for form submission the right way. I'm looking for something that will replace all radio inputs with divs that get special classes when they are hovered or clicked, an...

Any alternative to jQuery change() to detect when user selects new file via dialog box in IE8?

I am unable to detect when input type="file" changes its value after user selects file and the dialog box closes. $('.myInput').change(function(){ alert($(this).val()); }) Above jQuery code works perfectly in all browsers apart from IE. For some reason IE detects the change only after input field loses focus. Is there a way to d...

"Intercepting" user input into text box and removing it

I have a text box that I would like to do some validation on. At the moment I have this code: function updateChanger() { // Validate input var likeMessage = validateInput($("#like").val()); alert(likeMessage); } function validateInput(input) { input = input.replace(/[^a-zA-Z0-9:\(\/\)\s\.,!~]/g, ""); return input;...

javascript how to display text when mouse over input text box?

How to display text when mouse over an input text box the simplest way (no css, or etc)?? ...

How do I stop Chrome from pre-populating input boxes?

Is there some way I can stop Chrome from auto populating input boxes? I have a page with a Sign Up form and a Log In form. In Chrome, if a user has already signed up and they've come to this page to log in, the password input box on the sign up form is populated with their password. I would really like to force the sign up fields to n...

how to remove trailing and leading whitespace for user-provided input in a batch file?

I know how to do this when the variable is pre-defined. However, when asking for the user to enter in some kind of input, how do I trim leading and trailing whitespace? This is what I have so far: @echo off set /p input=: echo. The input is %input% before ::trim left whitespace for /f "tokens=* delims= " %%a in ("%input%") do set inpu...