textarea

HTML input text cannot select text using mouse

I have a HTML page with input text elements and textarea elements. Text typed into these elements can be selected with the mouse cursor. Clicking anywhere on the text value places cursor in that location. In some cases, the mouse functions stop working. Cannot use the mouse to place cursor or to highlight/select text. So far, I have ...

Detecting when textarea scroll has reached the bottom to enable button

I want to display a license agreement in a scrolling textarea and detect when the user has scrolled to the bottom of the text area, then enable the submit button. Is there a way to do that? ...

Jquery Fade Effect On Form Input Focus

this question is similar to my previous hover question (http://stackoverflow.com/questions/1851141/converting-css-hover-to-jquery-hover) but the answer will be different because it involves a click function and two bgs. I am building a contact page, and when the user clicks on one of the input fields, I want the background of the input ...

jQuery: Insert text to textarea

How can i utilize jQuery to insert text at the cursor into a textarea. ...

Force spell check on a textarea in WebKit

I'm creating a browser based QC/data entry app that will let people edit OCRed files, which naturally have tons of errors. Chunks of data are put in textareas so they can be checked, but the red underlines only appear when the user manually puts the cursor in a misspelled word. Is there a way to force WebKit to add the little red spell ...

Which value will be sent by <textarea> and why?

<form> <textarea name="test" value="no"> hi </textarea> <input type="submit" /> </form> hi or no,and reason? I ask this question because I see javascript editors use textarea.value = html; to restore the content when submit,why they do this if value attribute is useless? ...

Why javascript editors use iframe to implement?

Why do they prefer using iframe and turn on design mode by .contentWindow.document.designMode = "on" instead of directly using textarea? ...

how can i get cursor position in a textarea?

hi there, how can i get cursor position in a textarea using jQuery? thanks ...

Allow HTML in TextArea

I'm building a custom options panel in Wordpress. One of the options I'd like to offer is the ability to add text and html to the footer. I can enter simple tags like, bold - but when you add a URL crazy stuff happens. I did some googling and found "stripslashes", alas that doesn't work either. The code below is part of a giant case sta...

textarea scrollbars overflow and hide div border

I've tried this on many browsers ( via browsershots ) and universally the scrollbars overflow and hide the green border. I don't want overflow: hidden because that clips the scrollbars. How do I get the scrollbars inside the border, instead of obscuring the border? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:/...

HTML/CSS/JS: How to make an illusion of a textarea with line numbers?

I want to have a textarea which displays line numbers on the left. Wrap should be set to "off" (so that horizontal scrolling is available). I want to have my page as a single self-contained .html file (there will be no graphics), so I'd like to avoid any 3rd party frameworks. Which way should I go? How would you do this? ...

How do I set a backwards selection?

I'm working on a custom tokenfield based on textarea. The idea is to have a textarea with div elements absolutely positioned above, so it looks like they are in text area. It was pain so far, but I managed to do pretty much everything, except one thing. Is it even possible in javascript to set reverse-selection? When you put a cursor s...

Cant update textarea with javascript after writing to it manualy

Hello. So here's the thing... I'm writing an online application where I save some texts to the database. There are like 5 "textarea"-s and 5 "input type=text"-s. I'm also implementing a search to easily find and edit the DB entries. A new select window is displayed(using prototype and ajax), and when clicking on any of its entries the b...

How to get the displayed text portion in a Flex TextArea

Hi, hi want to know the index of the first character displayed in a scrollable TextArea in Flex3 and i need the last character's index too. Any ideas ? Thanks ...

Textarea spellcheck attribute XHTML Strict

I would like to turn off the built-in spellcheck functionality in certain browsers such as Firefox and Opera on a textarea that contains HTML embed code for visitors to copy and paste. This can be done with following attribute: spellcheck="false" However, this causes a validation error for XHTML Strict. Also, it doesn't work properly i...

jquery regular expression for a text area

I have a regular expression that returns us and canada zipcodes as follows. ((?<US>\d{5})|(?<Can>\b[A-Z-[DFIOQUWZ]]\d[A-Z-[DFIOQU]]\ +\d[A-Z-[DFIOQU]]\d\b)) I need to do this in java script or jquery. An application that can extract only these values. For example someone could simply paste a document into the textarea, click a butto...

Setting (or Reading) value of Cursor/Caret in HTML TextArea

I am trying (and failing) to implement a drag&drop mechanism into an HTML textarea. Drag&Drop mechanism is relatively easy with jQuery or Scriptaculous (we use both), so I am willing to accept an answer that uses either of these two. Problem is, I cannot seem to find a way to read or set the insertion point. What I ultimately want t...

How to get the modified portion of text in a TextArea

Hi all, i need to know which part of the text is been modified by the user inside a Flex TextArea. I'm listening to TextArea's Event.CHANGE and my code run on everychange but i don't know what the user have done to the text and it's too long to process it again at every keypress or paste We are still with Flex 3.5 but i may consider Fle...

HTML textarea not correctly sized in table in ie8. Doctype problem?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Untitled Page</title> <style type="text/css"> #textarea1 { width: 100%; overflow:hidden; } #...

Coloring lines inside textarea

Is there any way to make textarea display lines in colors? What I am trying to achieve is every second line colored, i.e. white,grey,white,grey,white,grey... for better readability. Users are supposed to write in lots of stuff, as in "enter names, each one from new line". I do use jQuery anyway so if they made some simpler solution for ...