input

jQuery wrap() not working

HTML: <input type="text" class="text text-1" /> jQuery $('input.text-1').wrap('<span class="textfield-1"></span>'); CSS: .textfield-1 { border: 1px solid #d00; display: none; } wrap() doesn't seem to work. I don't see 's wrapped around input in firebug. If they were wrapped, inputs would be hidden with display:none, but ...

Why does not the input of a string work?

#include <stdio.h> int main() { char temp[1024]; if(getchar() != 'y') { printf("no options\n"); return 1; } scanf(temp, "%s"); printf("%s", temp); } I get snippet as below. I just want twice input from user. but the first input works, however the second dir...

How do I add joystick support into OpenGL?

I want to add joystick support into an openGL application. Is there any class that can help me? Thanks in advance. ...

Specify input() type in Python?

I'm still learning so please forgive if this sounds like a dumb question. Is it possible to define input times, like time, date, currency or that should be verified manually? Like for example: morning = input('Enter morning Time:') evening = input('Enter evening Time:') .. I need (only) time here, how do I make sure that user enters i...

Reading from input file in command line

Hi, This time I have a very lame problem, which was working perfectly but now its not: BufferedReader br = new BufferedReader(new InputStreamReader( System.in)); while (br.readLine() != null) { System.out.println(br.readLine()); } Input file: 1 2 3 4 5 6 7 8 9 In command line: ...

JQUERY BIND to a LABEL, and pass the name & value

<p id="noteTypebox"> <label for="noteType_2" class="notetypelabel" id="noteType_2" > <input type="radio" name="noteTypeID" value="2" class="notetype">IDI</input> </label> </p> Given the code above, I would like JQUERY code that Binds to the LABEL, since the INPUT box is hidden (I don't want the radio buttons on the apge). When a user...

Modifying an existing input method in Emacs for Faroese keyboard input

I was searching for at solution that could provide me a Faroese input method for use in Emacs 23.1.1. That is what I want. The faroese-keyboard input method does not exist in Emacs. It will be necessary to use a modified version of the Danish-keyboard. The Danish keyboard is mostly similar to Faroese keyboard. Only two keys differ, one ...

IE7 glitch with appendChild() for an input box

I am using the following JavaScript to add a number of inputs based on a number in a drop down menu. It works fine in firefox and chrome, but in IE7 the inputs all float left on a new line. function add(number) { var foo = document.getElementById("listInputs2"); var count = 1; foo.innerHTML = ""; while ( count <= (number) ) { //Creat...

jQuery: append form input

Hey guys, here is my html output: <script language="javascript"> function append_suggestion() { $('input[name="cn"]').append($('#rand-character').val()); } </script> <form name="form" action="/search/results" method="get" class="search-form" id="search-autocomplete"> <input size="28" class="search-field" id="cn" name="cn" typ...

disable scrolling on input focus in javascript

I was wondering if it was possible to stop the page from scrolling using javascript when a user type or clicks on a <input type="text"></input> ...

CodeIgniter - How to set default value to unchecked for radio buttons/checkboxes while using set_radio and set_checkbox ?

I think I'm missing some simple here, but I can't figure it out for the life of me. I'm using the set_radio() and set_checkbox() methods to return their values if validation fails, like this <input type="radio" name="gender" value="male" <? if(!isset($thankyou)) { echo set_radio('gender', 'male'); } ?>/>;Male <br /> <input type="radio...

Restricting open dialog box to certain files using javascript.

When uploading photos and videos, the open dialog box should default to file suffixes that are relevant. e,d when i uploading images, it should show only file with extension .jpeg, jpg, gif, png, bmp etc. And same with videos.. Thanks. ...

How can a javascript function be fired when a user types text into an input field or pastes text into it?

$(document).ready(function() { $("input[id^='question']").live('keyup',function(ev){ id=this.id.substr(8); if (ajaxCallTimeoutID != null) clearTimeout(ajaxCallTimeoutID); ajaxCallTimeoutID = setTimeout(function(){subjectivecheck(id)}, 1000); }); }); There is a problem. When a user pastes text into an input field, the func...

submit form with delay while entering data into input field

I have a simple form that I need to submit automatically when text is entered. I can use the onChange or onKeyUp without the best result. HTML is: <form action="" id="fusionSearchForm" method="post"> <input type="text" class="std_input" id="fusion_searchText" /> </form> And jQuery jQuery("#fusionSearchForm").keyup(function(...

java function - print(collection c) ?

Hi. I'm trying to learn java better and I got one question. Say I got two collections, an ArrayList and a LinkedHashSet. Is it possible to make a function like this: void print(collection c) { for (object tmp:c) { System.out.println(tmp); } } ...

Get user input from form, write to text file using php

As part of a subscriber acquisition I am looking to grab user entered data from a html form and write it to a tab delimited text file using php.The data written needs to be separated by tabs and appended below other data. After clicking subscribe on the form I would like it to remove the form and display a small message like "thanks fo...

Correct way to read a text file into a buffer in C?

I'm dealing with small text files that i want to read into a buffer while i process them, so i've come up with the following code: ... char source[1000000]; FILE *fp = fopen("TheFile.txt", "r"); if(fp != NULL) { while((symbol = getc(fp)) != EOF) { strcat(source, &symbol); } fclose(fp); } ... Is this the correc...

AS3 TextField - unwanted carriage return when setting value to ""

I have an input TextField and have a KeyboardEvent.KEY_DOWN even listener on the stage to listen for the Keyboard.ENTER event. The event listener adds the entered text to an array or whatever, and then clears the TextField. The problem is that when the Enter key event fires and the TextField value is set to "", it leaves a carriage ret...

Is it possible to recover keyboard input that was done while Mac OS was starting up?

Hello everyone! I wonder if it is possible to figure out what keys user was pressing while his Mac OS was starting up? Any way will do. As far as I understand it there is no easy way to simply hook an app/script to start working and capturing keystrokes simultaneously along with the OS. But maybe there is a way to some kind of reverse ...

CSS How to place a submit button on a new line?

How can I place an input type=submit on a new line following a text area element? without using a br tag or a div, ideally I like to do it using css. ...