Search Results

Search found 17195 results on 688 pages for 'input'.

Page 6/688 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Stuck on conditionally enable or disable input with JQuery

    - by dmr
    I am attempting to conditionally enable or disable HTML input based on the value of a variable. The "disable" part is working well, but the "enable" isn't, and I can't figure out why. The code: <--if variable is true...--> <div id="disabledSearch" class="searchBox disabled"> <script type="text/javascript"> $('#disabledSearch :input').attr('disabled', true); </script> <--if variable is false--> <div id="enabledSearch" class="searchBox"> <script type="text/javascript"> //This line isn't working: $('#enabledSearch :input').removeAttr('disabled'); </script>

    Read the article

  • How to change input button image using CSS?

    - by Baltimark
    So, I can create an input button with an image using <INPUT type="image" src="/images/Btn.PNG" value=""> But, I can't get the same behavior using CSS. for instance, i've tried <INPUT type="image" class="myButton" value=""> where "myButton" is defined in the css file as .myButton{ background:url(/images/Btn.PNG) no-repeat; cursor:pointer; width: 200px; height: 100px; border: none; } If that's all I wanted to do, I could use the original style, but I want to change the button's appearance on hover (using a myButton:hover class). I know the links are good because I've been able to load them for a background image for other parts of the page (just as a check). I found examples on the web of how to do it using javascript, but I'm looking for a css solution. I'm using Firefox 3.0.3 if that makes a difference. Thanks

    Read the article

  • Use text input as php variable

    - by Thomas Lai
    <input type="text" onkeydown="domaincheck()" /> <?php function domaincheck() { $recordexists = checkdnsrr("", "ANY"); if ($recordexists) echo "The domain name has been taken. Sorry!"; else echo "The domain name is available!"; } ?> I want my php code to process the text input and say if it's a valid domain or not. The only thing that doesn't work is linking the input to the php.

    Read the article

  • python input UnicodeDecodeError:

    - by The man on the Clapham omnibus
    python 3.x >>> a = input() hope >>> a 'hope' >>> b = input() håpe >>> b 'håpe' >>> c = input() start typing hå... delete using backspace... and change to hope Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 1: invalid continuation byte >>> The situation is not terrible, I am working around it, but find it strange that when deleting, the bytes get messed up. Has anyone else experienced this? the terminal history shows that I thought that I entered h?ope any ideas? in the script that is using this, I do import readline to give command line history.

    Read the article

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

    - by sebrock
    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 and do some stuff Goto 1. I was thinking using a timer and timertask to keep track of time and maybe use a boolean variable that changes from "open" to "closed" after 10 seconds? Please give me some advise on this.

    Read the article

  • Disable input fields based on selection from drop down

    - by Thomas
    I have a drop down box and some text input fields below it. Based on which item from the drop down menu the user selects, I would like to disable some of the fields. I think I am failing to target the input fields correctly but I can't figure out what the problem is: Here is the script I have gotten so far: $(document).ready(function(){ var customfield = $('#customfields-tf-19-tf'); var customfield1 = $('#customfields-tf-20-tf'); var customfield2 = $('#customfields-tf-13-tf'); $(function() { var call_table = { 'Condominium': function() { customfield.attr("disabled"); }, 'Co-Op': function() { customfield1.attr("disabled"); }, 'Condop': function() { customfield2.attr("disabled"); } }; $('#customfields-s-18-s').change(function() { call_table[this.value](); }); }); }); And the layout for my form: <td width="260" class="left"> <label for="customfields-s-18-s">Ownership (Required):</label> </td> <td class="right"> <select name="customfields-s-18-s" class="dropdown" id="customfields-s-18-s" size="" > <option value="Condominium"> Condominium</option> <option value="Co-Op"> Co-Op</option> <option value="Condop"> Condop</option> </select> </td> </tr> <tr> <td width="260" class="left"> <label for="customfields-tf-19-tf">Maintenance:</label> </td> <td class="right"> <input type="text" title="Maintenance" class="textInput" name="customfields-tf-19-tf" id="customfields-tf-19-tf" size="40"/> </td> </tr> <tr id="newsletter_topics"> <td width="260" class="left"> <label for="customfields-tf-20-tf">Taxes:</label> </td> <td class="right"> <input type="text" title="Taxes" class="textInput" name="customfields-tf-20-tf" id="customfields-tf-20-tf" size="40" /> </td> </tr> <tr> <td width="260" class="left"> <label for="customfields-tf-13-tf" class="required">Tax Deductibility:</label> </td> <td class="right"> <input type="text" title="Tax Deductibility" class="textInput" name="customfields-tf-13-tf" id="customfields-tf-13-tf" size="40" /> </td> </tr>

    Read the article

  • move carat to the end of a text input field AND make the end visible

    - by user322384
    I'm going insane. I have an autosuggest box where users choose a suggestion. On the next suggestion selection the value of the text input box exceeds its size. I can move the carat to the end of the input field crossbrowser, no problem. But on Chrome and Safari I cannot SEE the carat at the end. The end of the text is not visible. Is there a way to move the carat to the end of a text input field AND have the end of the field visible so that the user is not confused about where the input carat went? what I got so far: <html> <head><title>Field update test</title></head> <body> <form action="#" method="POST" name="testform"> <p>After a field is updated the carat should be at the end of the text field AND the end of the text should be visible</p> <input type="text" name="testbox" value="" size="40"> <p><a href="javascript:void(0);" onclick="add_more_text();">add more text</a></p> </form> <script type="text/javascript"> <!-- var count = 0; function add_more_text() { var textfield = document.testform.elements['testbox']; textfield.blur(); textfield.focus(); if (count == 0) textfield.value = ''; // clear old count++; textfield.value = (count ? textfield.value : '') + ", " + count + ": This is some sample text"; // move to the carat to the end of the field if (textfield.setSelectionRange) { textfield.setSelectionRange(textfield.value.length, textfield.value.length); } else if (textfield.createTextRange) { var range = textfield.createTextRange(); range.collapse(true); range.moveEnd('character', textfield.value.length); range.moveStart('character', textfield.value.length); range.select(); } // force carat visibility for some browsers if (document.createEvent) { // Trigger a space keypress. var e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 0, 32); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 0, 32); } textfield.dispatchEvent(e); // Trigger a backspace keypress. e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 8, 0); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 8, 0); } textfield.dispatchEvent(e); } } // --> </script> </body> </html> Thanks

    Read the article

  • Display a input type=file over another input type=file

    - by Kevin Sedgley
    WARNING: Lengthy description coming up! I have written an uploader based upon APC progress uploader for PHP. This works fine and dandy, but the script as a whole (apc etc) is intended to be used only for those with Javascript. To achieve this, I have searched for any input type=file, and replaced these with an absolutely positioned form that appears over the original area where the old file input area was. The reasons for this are so the new uploader can submit to a hidden in page IFrame has to be in a seperate <form> in order to submit to the APC reciever to display the progress upload bar. allows it to be used within any form with an input type=file throughout the site I have used JQuery to do this, with the following code: Original HTML form code: <div><input type="file" name="media" id="media" /></div> Find position of div block code: // get the parent div, and properties thereof parentDiv = $(this).closest('div'); w = $(parentDiv).width(); h = $(parentDiv).height(); loc = $(parentDiv).offset(); Locate new block over old block: $('#_sender').appendTo('body').css({left:loc.left,top:loc.top,position:'absolute',zIndex:400,height:h,width:w}).show(); This works fine, and shows over the old block OK. The problem: When other elements in the DOM before or above it change (in this case a "tree view" selector is pushing the old block down) the new upload form gets moved over other elements. Is there a JQuery (or JS) method for changing this upon DOM change? Some kind of .onchange for the page?! Or an .onmove for the original block? Thanks in advance you lovely people Before DOM change: . After: .

    Read the article

  • Python 3: receive user input including newline characters

    - by Beau Martínez
    I'm trying to read in the following text from the command-line in Python 3 (copied verbatim, newlines and all): lcbeika rraobmlo grmfina ontccep emrlin tseiboo edosrgd mkoeys eissaml knaiefr Using input, I can only read in the first word as once it reads the first newline it stops reading. Is there a way I could read in them all without iteratively calling input?

    Read the article

  • Uploading files using HTML file input on iphone

    - by futureelite7
    I am creating a web form for uploading small movie clips to a HTTP server. However, while my HTML file input control gets shown on an ipod touch, the button is completely disabled and I cannot click it to upload files. What do I have to do to use the input control to upload files (e.g. movie clips or pictures) to my HTTP server. My page is XHTML MP 1.2 compliant.

    Read the article

  • HTML Select and Text Input

    - by Vijay Dev
    We have all seen countless instances of forms with a select drop down having one of it's options as "Other" and on choosing that option, we get to see a input text box (which was hidden all along) asking us to type in our input. Is there a better way to implement this? Are there plugins out there which will let me do this better? Or are standard HTML elements suffice (some setting to a , may be) ?

    Read the article

  • Xcode and input/output files

    - by user112232
    I have to put my input files directly in the root directory for xcode to see them, and the output files are always in the same root directly. How can I configure xcode to change the input/output directories ?

    Read the article

  • cross platform keyboard/mouse input recommendation

    - by Jay
    Does anyone have any suggestions for a good cross platform input library? I'd like to get: * at least keyboard and mouse input * on at least the big three operating systems * Small/fast * C or C++ * permissive licensing gpl2/mit/free/etc. So far I've seen: * OIS (used in Ogre) http://sourceforge.net/projects/wgois/ * SDL (used everywhere it seems, might be a clue) http://www.libsdl.org/index.php * Allegro http://www.talula.demon.co.uk/allegro/readme.html Has any one used any of these, or know of something else that might be good? Thanks

    Read the article

  • jQuery user input to control option of one jquery function

    - by Tristan
    Hello, I'd like an input to control that : jQuery.ajax({ type: "get", dataType: "jsonp", url: "http://www.foo.com/something.php", data: {numberInput: "NUMBER I WANT TO CONTROL" }, On the HTML side I've <input type="text" id="jqueryControl" /> I want when a user enters a number into the jqueryControl to insert it in the .ajax function and reload the data according to the new value entered. Any idea to do that please ? Thanks

    Read the article

  • Using perfectly formatted input as list in Haskell

    - by RankWeis
    I'm doing a program in Haskell (on the Haskell platform), and I know I'm getting perfectly formatted inputs, so the input may look like [ ['a'], ['b'], ['c'] ] I want Haskell to be able to take this and use it as a list of it's own. And, I'd like this list to be over multiple lines, i.e., I want this to also work: [ ['a'], ['b'], ['c'] ] I can parse this input, but I've been told there's a way to do this easily - this is supposed to be the 'trivial' part of the assignment, but I don't understand it.

    Read the article

  • Append INPUT to TEXTAREA as being types in JQuery

    - by Ricky
    I have an INPUT text box. As someone types into the INPUT text box, i need it to append/add-to a TEXTAREA value. Lets say user types '12345' into the text box. The textarea (default value="Comment: ") will automatically add: 'Comment: 12345'. Adding '12345' as they type.

    Read the article

  • actionscript 2.0 input text box

    - by user1769760
    So, here's what I'm trying to do, and I, frankly, believe it should be obvious, but I can't figure it out. I am creating a very simple Artificial Intelligence simulation. And in this simulation there's an input box at the bottom of the screen (called "input" exactly). "input" has a variable in its properties that is called "inbox" (exactly). Using a key listener the script calls up a function when the enter button is pressed. This function has 2 if statements and an else statement which dictate the responses of the AI (named "nistra"). The problem is this, When I type in what I want to say, and hit enter, it always uses the second response ("lockpick" in the code below). I have tried variations on the code but I still don't see the solution. I believe the problem is that the "typein" variable holds all the format information from the text box as well as the variable, but I could be wrong, that information is in here as well, underneath the code itself. Any help I can get would be greatly appreciated. var typein = ""; //copies the text from inbox into here, this is what nistra responds to var inbox = ""; //this is where the text from the input text box goes var respond = ""; //nistra's responses go here my_listener = new Object(); // key listener my_listener.onKeyDown = function() { if(Key.isDown(13)) //enter button pressed { typein = inbox; // moves inbox into typein nistraresponse(); // calles nistra's responses } //code = Key.getCode(); //trace ("Key pressed = " + code); } Key.addListener(my_listener); // key listener ends here nistraresponse = function() // nistra's responses { trace(typein); // trace out what "typein" holds if(typein = "Hello") // if you type in "Hello" { respond = "Hello, How are you?"; } if(typein = "lockpick") // if you type in "lockpick" { respond = "Affirmative"; } else // anything else { respond = "I do not understand the command, please rephrase"; } cntxtID = setInterval(clearnistra, 5000); // calls the function that clears out nistra's response box so that her responses don't just sit there } clearnistra = function() // clears her respond box { respond = ""; clearInterval(cntxtID); } // "typein" traces out the following <TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="Times New Roman" SIZE="20" COLOR="#FF0000" LETTERSPACING="0" KERNING="0">test</FONT></P></TEXTFORMAT>

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >