input

<input /> type conversion (jQuery)

I have this: <input type="text" value="Enter Password" class="password" /> ... onclick/onfocus, I'd like to change the input type to 'password' and value removed, like so: <input type="password" value="" class="password" /> This doesn't seem to work: $('input.password').click(function () { $(this).attr('type', 'password'); ...

Asp.net MVC accept formatted input?

How is formatted user input typically handled in an MVC application? A user entering "1,000.00" for a number for example. I'm somewhat surprised the default ModelBinder does not pick up on this. Would this be the type of thing I would create my own ModelBinder for? ...

ASP page not receiving POST parameters

Hi all, I am writing a small application in Classic ASP. I have a page which has a form, which posts to a second page. Included with the form's POST, are file uploads, hence the need for a POST method. The second page though is NOT seeing ANY of the fields being sent by the first page. Calling either Request("param") or Request.Form("...

Updating Bean from JSF dataTable

I've got this h:dataTable and form: <h:form> <h:dataTable value='#{bean.allData.dataItems}' var='item'> <h:column> <h:outputText value='#{item.id}' /> </h:column> <h:column> <h:inputText value='#{item.name}' /> </h:column> </h:dataTable> <h:commandButton value="Save" action="#{bean.saveEntries}"/> </h:form> So ...

Ways to remove the autocomplete of an input box

Hi I need a text input field which does not use the autocomplete function - If a user has submitted the form before, his previous submissions should -not- appear as he types into the form again, even if he is typing the same thing again. As far as I can tell, there are a few ways to do this: 1. <form autocomplete="off"> However, I beli...

PHP - How to use arrays for form input and update respective database records

I'm new to PHP... I want to know how to populate a form from mySQL. I'm stumped at the input section where I am trying to allow the user to select choices for radio button /checkbox for each record. thanks in advance for anyone's help! TC Here's a snippet of my code: <?php $mQuantity = 1; $con = mysql_connect("localhost","t","c");...

Python: Checking Header Format

I'm new to python and need help with a problem. Basically I need to open a file and read it which I can do no problem. The problem arises at line 0, where I need to check the header format. The header needs to be in the format: p wncf nvar nclauses hard where 'nvar' 'nclauses' and 'hard' are all positive integers. For example: p wncf ...

Python: Import a file and convert to a list

I need help with importing a file and converting each line into a list. An example of the file would look like: p wfgh 1111 11111 111111 287 48 0 65626 -1818 0 4654 21512 02020 0 The first line beginning with p is a header and the rest are clauses. Each clause line must begin with a series of at least two integers and finish with a z...

python raw_input def input problem

I am only going to post the portion where the problem is at, the program has no error (all the codes are valid except for this raw_input problem) I tested with search_function(1) and etc and it worked. But if I do this while loop, it doesn't print anything. Example output: Enter a number to print specific table, or STOP to quit:...

xslt form fields - get input with unknown name

UPDATED - since I was not clear in me expressions. Will try again: I have a form with several inputs that are created dynamically like this: <form id="tellafriend_form" method="post" action="landingpage.aspx"> <!-- static example --> <input type="text" id="my_example" name="my_example" value="" /> <!-- dynamic part --> <xsl:fo...

WPF - simulate mouse events on off-screen rendered Grid

I'm rendering a WPF grid with multiple elements (buttons, textbox, ...) to a bitmap which is then used as a texture for a 3D surface in a Direct3D scene. For user interaction I create a 3D ray from the 2D mouse cursor position into the 3D scene finding the intersection point with the gui surface. So I know where the user has clicked on t...

Javascript focus on browse button of file input

I am trying to focus on the browse button of the file input control. so I have something like <input type="file" name="upload" id="upload" > and in javascript I have document.getElementById("upload").focus(); but the focus remain on the text field and comes to browse button only after i hit tab. Is there a way that I could write ...

Splitting up lines into ints

I have a file that I read from, it contains a bunch of lines each with a different number of integers, I'm having trouble splitting it up into a vector of a vector of ints. This is my current code. std::vector<int> read_line() { std::vector<int> ints; int extract_int; while((const char*)std::cin.peek() != "\n" && std::cin.p...

jQuery Input check - disable submit - problem

I wrote a simple value checker for needed inputs, please see the demo here: http://tinyurl.com/yeqwoju $('.required').keyup(function(){ if($(this).val() == '') { $(this).addClass('warning'); $('.meet').addClass('disabled').attr('disabled',true); } else { $(this).removeClass('warning'); //if($(this).siblings('.required').val()...

java getting to see the user input side

Okay given this: javac is the java compiler. It compiles the file, but has no output if there are no warnings or errors. What can I use to view the file from a user's perspective- user is suppose to see a vending machine that allows them to buy certain stuff from vending machine.java, apparently just running javac somevendmachi...

HTML Compress File Upload?

Hi, is there any way you can get a browser to compress a file before uploading it? ie from an <input type="file"> Thanks, Jamie ...

Python: Synchronize Input and Output Between Threads

Hey, Currently, I am trying to do a small project with sockets in Python, a two-user chatting system. import socket import threading #Callback. Print doesn't work across threads def data_recieved(data): print data #Thread class to gather input class socket_read(threading.Thread): sock = object def __init__(self, sock): ...

c pointer as inputs

Hi, when I'm trying to push elements to a stack I get segmentation fault, but if I open address for stack(i marked them with "!!!") and it's symbols it accepts it. But this time in each push, it creates new address and doesn't increase top value. typedef struct { struct table **symbols; // array of the stack int top; //index of th...

How to change the button text of <input type="file" />?

<input type="file" value="Browse" name="avatar" id="id_avatar" /> I tried to modify the value, but it's not working. How to customize the button text? ...

Using the return value from scanf in the C programming language as a check

How do you use the return value from scanf to make sure it is a double I've got? double input; do { /* do this as long as it not a double */ printf("Input?"); scanf("%lf", &input); } while(scanf("%lf", &input) != 1); /* this will not work */ ...