input

Cakephp ctp create form input - php

i am creating a calender prog, using cakephp when calling a method disp with month and year as params, it should disp the calender.. this my index.ctp//$month int 1 to 12 //$mon[12]=='December' <?php echo $form->create('Calendar', array('action' => 'disp', 'class' => 'normal')); ?> <?php echo $form->input('month', array('options' =...

get list of all <input objects in javascript, without accessing a form object

I need to get all the input objects and manipulate the onclick param. the following does the job for links. looking for something like this for input tags. for (var ls = document.links, numLinks = ls.length, i=0; i<numLinks; i++){ var link = unescape(ls[i].href); link = link.replace(/\\'/ig,"#"); ...

JS Input box more of them?

Hello. I have a profile.php, where each user in the community have their profile. Now i want to do something smart out of the editing, so i wish to do so when you click on a field it turns to a input and then you can edit it the field.. (example: www.azzyh.dk, click on "Click ME") Anyways, I know how to do this already, heres a script:...

Fix a character to text input box using javascript/jquery

I am looking for a way to 'fix' a dollar symbol $ to a text input box eg <input type="text" value="$" /> but make it not possible for the default value to be removed, so that whatever the user inputs, there is always a $ symbol 'prepending' input. Cheers ...

Vertically Center Text in an Input Element

I have the following input element (I deliberately omitted attributes which weren't necessary for the example): <input type="text" style="display: block; height: 40px; font-size: 14px; line-height: 40px"> In Chrome and Internet Explorer (probably Opera too), any text inside the input will be vertically centred. However, Firefox seems ...

How to get original input attributes

Hi, I use qQuery as a glue to obtain/search original DOM elements by ID to use their original properies and methods. jQuery provides the function get() for this. How does this work with the input element? <html> <head> <script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"&gt;&lt;/script&gt; <script> $(function () { ...

Reading in multiple words for prolog

Im running prolog via poplog on unix and was wondering if there was a way to read in multiple words (such as encase it into a string). For instance, read(X) will only allow X to be 1 term. However, if I encase the user input with "", it will return a list of character codes, is this the correct method as I can not find a way to convert i...

How do I read in a double in Java?

I am trying to get a decimal input from the keyboard, and it is just not working. First I tried double d = Integer.parseInt(JOptionPane.showInputDialog( "Please enter a number between 0 and 1:")); and that obviously didn't work very well. I am used to just parsing int's as they come in from the ke...

C++ key input in Windows console

I'm currently developing various console games in Windows that won't really work using regular input via cin. How can I (In a simple way using only standard windows libraries available in MSVC): Make the program wait for a (specific?) key press and return the key ID (It would have to work for all keys including the arrow keys) During ...

parsing textarea input with PHP as if its a csv?

hey all i'm trying to make a site where people paste a CSV file directly into a textarea (say its called "original-text") and parse it, with my script then generating something from that. i know how to parse a csv file on the server (using fgetcsv) but not how to get the input from a POST variable INTO that fgetcsv. so far i've tried som...

Concurrent/Non-blocking console keyboard input in Java

I'm working on a MUD in java. I read player input every tick, but I'm using Scanner which uses blocking operations. I want to have non-blocking input. I've looked at the nio package which has a Selector class, but I'm not sure how to use it with regard to System.in. I figure I'll definitely need it once I'm running a server, but for no...

Form field data history not retained

I have a form on a page that is shown via https:// as follows: <form id="memberslogin_form" name="memberslogin_form"> <fieldset> <legend>Login</legend> <div> <label for="membershipId">Membership number</label> <input type="text" class="field" name="membershipId" id="membershipId""/> </div> <div> <label for="memberPassword">Pas...

Changing the title on an editor when the input changes due to file rename

Hi, how would I go about updating the title bar of an Eclipse editor when the file input changes to reflect the new filename? For instance, when the file is renamed but you still have an editor open on the file. Everything I've done so far has failed, even when following the official guidelines on doing this (using special interfaces, cl...

Changing the highlight color when selecting text in an HTML text input.

Hey folks! I've been looking for this throughout the web and can't even find anyone else even asking this, let alone a solution... Is there a way to change the color of the highlight area within a a text input when text is selected? Not the highlight border or the background, but the portion that appears around the text when you have t...

How do get the x&y corrdinates from an image input?

I have an input set to a type of image: <form id="MapForm" action="#"> <input type="image" src="usa.jpg" id="usa_map" alt="USA"/> </form> I want to attach a function so that I can get the X & Y coordinates where a person clicked: $('#MapForm').submit(ClickOnMap); function ClickOnMap(data) { return false; } I cannot find the...

How do I remove the space between table data in a table row in HTML?

Hi, I am trying to figure out how to remove the extra space between table data(s) in a table row in HTML. For example in the code below there is extra space between 'First Name' table data and the 'input name' table data when the code is viewed in my web browser IE. Here's the example: <tr> <td>First Name:</td> <td><input name="fnam...

How might I cause jQuery Autocomplete to display results with images, and no PHP?

I am implementing jQuery Autocomplete and wish to display results with an associated image. Each image has the same name as the predicted result of the autocomplete field. i.e. If someone types "braz" then "brazil" appears with brazil.jpg inline beside it. I'm having trouble implementing this. If anyone can point me in the right direc...

PHP checkbox input

An easy question: How do I check in PHP if a checkbox is checked or not? ...

How to disable Chrome spell check on INPUT with HTML or jQuery code?

I have an input in an HTML page <input id="SearchBox" type="text" value="" width="300px" title="Search the card pool" autocomplete="off" maxlength="170"> I would like to switch this off with something like autospellcheck="off". Is there a way to achieve that? Is there also a way to switch this off for Firefox? ...

Stripping non alphabetic and numeric characters before form submit, using jquery.

i have an ajax form i know i can use like return str = str.replace(/\D/g,''); to strip stuff before submit whats the best way to stop form submit when characters that are not alphabetic or numeric are inputed my the ajax search form is at vitamovie.com/movies ...