textarea

Textarea value not appearing on $_POST object

梦想的初衷 提交于 2019-12-08 09:29:41
问题 Guys, im scratching my head around this one. I have this website that basically contains a few forms that are filled in by the user. The user then can download that information in human readable format (pdf) or machine readable format (xml) but I'm having a slight problem submitting textboxes. I have a few of them, for instance in the description section, but when i access the $_POST['Desc_Desc_desc'] value, it's empty even though i can see content on the textarea. The weird thing is that

on click of text in text area

孤者浪人 提交于 2019-12-08 08:56:29
问题 I am trying to make each row in text area clickable,, the cursor can be default or pointer doesn't matter. jsfiddle <textarea rows="10" cols="45"> hello world </textarea>​ I want to make an ajax call on click of text in each row. I can write all the ajax functionality, all I am trying to figure out is clicking each row in the text are. Is it possible with text area or is there any other alternative to this. EDIT To be more precise, I am using <c:forEach items="${}" var=""> <c:out value="${} /

Disabling some special characters in text area

时间秒杀一切 提交于 2019-12-08 05:40:12
问题 Hey guys, I'm thinking of ways to disable users from typing some special characters like < and >. But I would like them to use full stops and commas and question marks and exclamation marks and quotes. I've come up with this piece of code but it doesn't seem to allow any special character.: <script type="text/JavaScript"> function valid(f) { !(/^[A-zÑñ0-9]*$/i).test(f.value)?f.value = f.value.replace(/[^A-zÑñ0-9]/ig,''):null; } </script> 回答1: There are several ways of doing this, none of them

Carriage return in text area

我是研究僧i 提交于 2019-12-08 03:28:29
问题 I have to allow the user to enter carriage returns in text areas; something like: Sentence 1 Sentence 2 ... I have to persist those carriage returns when loading and saving data. I use jQuery on the client side, and .NET on the server. Any suggestions on how to approach? Thanks. 回答1: If by "persist" the line breaks ( CRLF ) you mean that you want to display it properly, as SO does, you need to remeber to replace the CRLF pair with <br/>CRLF . Otherwise, all your text will appear sequentially.

how to have undeletable words(part of text) in textarea

旧时模样 提交于 2019-12-08 01:32:32
问题 I am developing an application which needs a part of text in the textarea undeletable while they can add their text to the textarea . For example when user come to a web page it has a textarea which has a text {username} of that user. The user can add more text like {username} hi the the earth is globe but should be unable to delete {username} from that textarea. I am using Jquery as the javascript class, any idea that we can achieve it in Jquery? 回答1: I think the only way to do this would be

How to find whether text in a text area is wrapped to multiple lines?

混江龙づ霸主 提交于 2019-12-07 21:53:26
问题 How can I find whether a long text in a textarea is wrapped into two or more lines? I'm not talking about the new line chars as discussed here. I'm aware of the plugin Textarea Line Count Any simpler method? 回答1: I experimented on this and came up with a hack that involves the following: Disabling text-wrapping in the textarea (plus disable padding) Checking if the textarea's scrollWidth is greater than it's width . The basic logic i used was that if the text is spanning multiple lines, that

Preserving Tabs in POST Data

£可爱£侵袭症+ 提交于 2019-12-07 12:46:21
问题 I need to preserve tab characters from a textarea through POST Data. It seems that there's no way to differentiate tabs from spaces in the $_POST array, and this is really frustrating me. I'm using a jQuery plugin from here to allow for tab and shift+tab usage within a textarea. http://teddevito.com/demos/textarea.html The jQuery plugin is using this as its Tab character: $.fn.tabby.defaults = {tabString : String.fromCharCode(9)}; For some reason, it shows an individual space instead of each

javascript catch paste event in textarea

旧城冷巷雨未停 提交于 2019-12-07 09:38:59
问题 I currently have a textarea which I requires control over text that has been pasted in, essentially I need to be able to take whatever the user wants to paste into a textarea and place it into a variable. I will then work out the position in which they pasted the text and the size of the string to remove it from the textarea, Then at the end deal with the text thats is in the variable in my own way. My question: how would I go about getting a copy of the text in a variable that was just

Return key not working within a <textarea>

你说的曾经没有我的故事 提交于 2019-12-07 07:23:54
问题 I have an issue with a textarea that is defined on an asp.net page. The textarea is populated in the back end with text read directly from an mssql database. <div id="emailForm" runat="server" style="display:inline;"> <textarea name="Body" id="Body" rows="20" cols="20"> text in here <textarea> </div> The following CSS is applied to the emailForm div: padding: 5px; width: 750px; font-family: Lucida Sans, Verdana, Arial, Helvetica, sans-serif; font-size: 0.9em; margin: 0px 0px 10px 0px; border:

jQuery Mobile Responsive Panel and Textarea

梦想与她 提交于 2019-12-07 06:04:23
问题 I've got jQuery Mobile application http://gudulin.ru/test/problem.html. Left panel opens after page loads: $('#my-panel').panel("open"); I added a class ui-responsive-panel to my page and @media css stuff, so I can work with panel and page content together. Everything is OK on laptops browser, but there is a problem on iPad browser (Safari or whatever else). When left panel is opened and I'm starting type text into text area, a page jumps after typing any symbol. The problem comes when you