input

Defining Form Input with Dialog

Hi. I want my php application to allow the user to select a file from their computer. I then want to store the file's path, but I don't want to upload the file. With the <input type="file" />, the file is uploaded, which would take too long. Is there a way to do this? Maybe if I change the input's type to text with jquery right before ...

Formtastic, own :as input type

How I can add my own field types to formtastic ? For exemple, I need to have a custom datetime input, and I want something like this: <%= f.input :start_date , :as => :my_date %> This obviously doesn't work because formtastic doesn't know the :my_date (only :boolean, :string, :datetime and so on...) But how can I add additional inpu...

Is it possible to use an input within a <label> field?

I have a bunch of optional "write-in" values for a survey I'm working on. These are basically a radio button with a textbox within the answer field - the idea being that you would toggle the button and write something into the box. What I'd like to do is have the radio button toggled whenever a user clicks in the text field - this seem...

masked input: I can't get the simplest completion to work

Trying to use Josh Bush's masked input plugin. I want to shift focus and do other things once the person puts their cell phone in. I mask to a phone shape. When I hit the last letter, I want it to trigger a javascript function. Right now that function just alerts hi. I even copied the demo right off Josh Bush's page: http://digitalbus...

Simulating mouse input programmatically in OS X

Is it possible to simulate the actions of a mouse from a program in OS X? Specifically, the short version is that I'm trying to simulate a touchscreen using two webcams. So assuming I can get X,Y positions, can I send information to the OS as a mouse movement or click? Edit- Or if it's particularly easy in another operating system I'd b...

check whether fgets would block

Hi, I was just wondering whether in C is it possible to peek in the input buffer or perform similar trickery to know whether a call to fgets would block at a later time. Java allows to do something like that by calling BufferedReader.ready(), this way I can implement console input something like this: while (on && in.ready()) { line ...

Three Checkboxes, One must be selected to enable submit button, needs Jquery?

I have between 1-three checkboxes and by default they are all disabled. In order for the submit button to be active ove checkbox minumum must be selected. Can someone help me with a jquery snippet to achieve this? My markup looks like this and the site used jquery 1.42. Please and thankyou! <form action="/cart/add" method="post" id="pfo...

using jquery to disable a series of radio buttons on demand.

I'm trying to accomplish something similar to Wikipedia's History history page, dynamically disabling radio buttons in a series. Ie... if #4 in group two is selected, then 1-4 of group one are disabled, etc. I know how to disable them individually or as a group, but I'm not sure how to do it in a series of say 1-4: Individually: $(...

PHP input sanitizer?

What are some good PHP html (input) sanitizers? Preferably, if something is built in - I'd like to us that. UPDATE: Per the request, via comments, input should not allow HTML (and obviously prevent XSS & SQL Injection, etc). ...

JAVA: How do I accept input during a certain period of time only

Im trying to do a simple game where I continually need input from players. This needs to happen during a certain time period only. Everything that is sent after that will be discarded. After the time period a new game starts. So: Start game Wait for input from all players during 10 seconds > 10 secs no more input Calculate the winner a...

html input cursor color

Hi everyone How to change the color of content in html input type text while entering some value. And also the cursor color when it has focus. ...

How do I overwrite a file currently being read by Python

Hi guys, I am not too sure the best way to word this, but what I want to do, is read a pdf file, make various modifications, and save the modified pdf over the original file. As of now, I am able to save the modified pdf to a separate file, but I am looking to replace the original, not create a new file. Here is my current code: from...

Silverlight - Input is not in a correct format. - Which Resource file has this text?

Can someone please let me know where the error text 'Input is not in a correct format.' is defined, which is thrown when alphanumeric data is entered in a numeric column in a Silverlight application? Is it in a resource file? I am trying to find out how to display this message in other languages. Please note that this message is differen...

width 100% on checkboxes makes it center aligned. How can I counter this?

I am setting all inputs to a 100% width via CSS. However, checkboxes are center aligned for some reason. Anyway to counter this? I don't want to have to use attribute selection via css since they're not fully supported. ...

VB time input, a better way to do it?

Hello Stack overflow, Working on a handy program for my boss at work as a summer project in between semesters both to make life easier for her, and to practice and improve my skills. Intent is to allow her to quickly and easily calculate the hours and minutes the person worked. The form itself has a series of text boxes for the Clock ...

c++ strings and file input

Ok, its been a while since I've done any file input or string manipulation but what I'm attempting to do is as follows while(infile >> word) { for(int i = 0; i < word.length(); i++) { if(word[i] == '\n') { cout << "Found a new line" << endl; lineNumber++; } if(!isalpha(word[i...

How does CommandManager.RequerySuggested work?

The MSDN only states that Occurs when the CommandManager detects conditions that might change the ability of a command to execute. However I can't seem to find any traces of how this works, what I should be aware of / avoid etc... Does it just listen for input? (i.e.: mouse moves, keys pressed and so on) ...

iPhone Input with Stacked Views

Hi, I've got a situation in an iphone application where buttons are not receiving input as I expect. Here's the setup: ViewMain - The main view full of various images and labels ViewOverlay - A HUD like overlay view with two UIButton objects. To create my scene I do the following: viewController.view = ViewMain [ViewMain addsubview:V...

Can't get my object to point at the mouse.

I'm using a combination of SDL and OpenGL in a sort of crash course project to teach myself how this all works. I'm really only interested in OpenGL as a way to use acceleration in 2D games so I just need this to work in a 2D plane. I have been having a lot of problems today with my current issue, I would like an object to point toward...

jQuery Date Picker where text input is read only

Hi all, I want to use the Jquery datepicker. I've got it setup using an the alt field option. I'm displaying Y-M-D in the text field, but submitting Y-M-D. Everything works fine so far, sending the correct data, etc. However I want to stop the user from being able to manually type a date. I add originally set the INPUT field to disable...