FAQ Database Discussion Community


how can I popup a text area using JQuery (nor input neither in another window)?

jquery,html,popup,textarea,smooth
I was looking for how to pop up a text area, but I only found input popups and "new window" popups, I want something like a text area that smoothly appears when you click on the button that launches the text area (probably JQuery), Can someone give me a tip...

Gap around textarea within a table

css,textarea
I've done some research on removing the gap I've got around a textarea located in a table. Depending on the browser, it appears at the top (IE, Chrome) or bottom (Firefox). <table border="0"> <tr> <form method="POST" action="updatereview.php"> <td class="shrink"> text </td> <td class="shrink"> <select name='update_score'> <option value="1">1</option> <option value="2">2</option> <option...

textarea content inside a .txt file but keep line-breaks

javascript,html,textarea,line-breaks
I have some piece of code that saves value of textarea into a local text file. Everything is seems to work fine but I don't want to lose line breaks. Code & fiddle: HTML <textarea id="textbox">Type something here</textarea> <button id="create">Create file</button> <a download="info.txt" id="downloadlink" style="display:none">Download</a> JS (function () { var...

How to access clipboard and current cursor position when pasting in a textarea in IE8/9 before it becomes the current value?

javascript,internet-explorer-8,internet-explorer-9,textarea,maxlength
Since IE8/9 do not support HTML5's maxlength attribute, I need to find a way to prevent pasting too long text into a textarea/input, so I chose to go with the onpaste-attribute/eventhandler via jQuery, see the example code below: $(document).ready(function() { $('textarea[maxlength]').on('paste', function() { var maxlength = $(this).attr('maxlength'); if (this.value.length >=...

Append selected list elements into textarea, add own text

javascript,angularjs,select,textarea
On the basis of this post : Angularjs select elements from list and display in textarea I would like to add functionality : Fill textarea on the basis of chosen elements from the list. Add additional text inserted by user -> when user decides that he/she wants to add element...

Avoid line returns on textarea text

html,css,textarea
I am having an issue with the text in my <textarea> tag. Here is the matter : My web app is a html page which write text on textarea on button click. When you click on this button, here is what the <textarea> shows : As you can see, I...

HTML/CSS Textarea and Div are different height

html,css,css3,textarea
I've styled a textarea with min/max width and min height (to allow scaling vertically, but in no other direction), and put a div next to it with the same height. For some reason, although the CSS doesn't lie they're different heights. Anyone know why and if there's a way to...

CKEditor will not show echo function

php,post,ckeditor,textarea,show
I implemented Ckeditor into my blog , and I have an "Edit Page". In that page I want to get the text that I wrote so I can obviously edit it, problem is it doesn't show up , like the rest of the text , here's my code after the...

add additional fields while maintaining input content

javascript,html,forms,textarea
I'm trying to make an input form with multiple fields and generate a preview of this content in a div. I would like the user to be able to add additional fields as they wish. I have the basic functionality working but anytime I "add" an additional field, the entered...

Pointers about resizing text area

javascript,regex,textarea
Need some help/pointers.... When the user will click on a p element i want it content to be displayed in an text area so it would be possible to modify the text and etc... The text area will be of a fixed width.Thus when the last character will be at...

Setting Background of TextArea

css,textarea,javafx-8
I would like to provide for user possiblity to select color of TextArea: private void updateTextArea(){ textArea.setStyle("-fx-text-fill: #" + textColor + "; -fx-background-color: #" + backgroundColor); } however this doesnt change color of whole background. Ive found on the Internet that to change backgroud of text Area I need to...

How to activate a textarea with jquery?

javascript,jquery,textarea
I have a textarea (#textarea), which I want to "activate" when a button (#activate) is clicked. By "activate", I mean the blinking prompt should appear and you should be able to type into the textarea. In other words, clicking on #activate should have the same effect as clicking on the...

Compare submitted textarea with initial value

php,html,textarea
I want to output an array (from a text-file) into a textarea, let users change it and afterwards save that array back to the text-file. <textarea name="text"><? echo(html_entity_decode(implode("\n", $array))) ?></textarea> Before the array gets stored back to the text-file, I want to make sure, that actually something was changed. if...

Render multiple values, separated by line break, within a textarea

javascript,html,angularjs,textarea,ng-repeat
I am rendering a dynamic form in angular. When attribute has multiple values I wish to render them within a textarea. Each value on its own line. But cant't get it to work! This is what I have so far: <script type="text/ng-template" id="form_field_text"> <label for="{{field.displayName}}">{{field.displayName}}</label> <br /> <div ng-if="field.multivalue ==...

Creating an calculator with javascript gives unexpected output [duplicate]

javascript,string,numbers,textarea
This question already has an answer here: How do I sum numbers using a prompt, like a simple calculator? [duplicate] 1 answer Heyy guys, I am trying to create an calculator that can sum. What I am trying to do is: Search for the plus, and get the place...

Default to original textarea val on Esc

jquery,textarea,keypress,var,revert
I'm trying to make an textarea default to the original value upon hitting esc. I can't seem to pass the origVal from the main code into the keypress if/else. Am I overthinking this or underthinking it? Fiddle: https://jsfiddle.net/kirkbross/brkbcr5c/1/ $(function() { var origVal = $("#textarea").val(); // set original value of textarea...

Display two columns data in textarea using table PHP

php,mysql,table,textarea
I am trying to display the data from two columns in a database table inside a textarea in php, under the headings tag number and scc It should read something like this. However it reads all in one line with no breaks and it looks messy. Here is my code,...

check whether any html tags entered in textarea using javascript

javascript,jquery,html,textarea,htmlspecialchars
I'm having a simple commenting system, where i want the user should not type any html special chars, if they done like that they should give an alert of "html tags not allowed". How to do it? while submitting, a ajax call is passed to another page to store it...

I want to check the content of textarea must contains previous inputs' words using javascript

javascript,jquery,html,input,textarea
Is it possible to check the content of textarea must contain previous inputs' all words using javascript or jquery? and if not contains all words than the value of textarea is invalid or will not submit. Please reply me soon. Thanks....

Can't post textarea with newlines/carriage return on submit

php,html,textarea
I'm simply trying to pass the values in a textarea through the post variable (or whatever $_POST is). More specifically I want to include the newline characters in it. Whenever I hit submit I have my code re-direct me to another webpage. <form action="blah.com" method="post"> .... <textarea id="Field15" name="Field15" cols="50"...

TextArea with Canvas Binding to Rect

java,canvas,textarea,jtextarea,game-loop
I have the problem of this textarea not showing up when I run it. Is there any way to make it show up. BTW its getting called through the gameloop on a class that extends canvas. public void render(Graphics g){ Graphics2D g2d = (Graphics2D) g; if(!initialized) init(); try { test.requestFocus();...

Provide feedback message in textarea based on mysql data

php,mysql,textarea
I am pulling the data out of two columns in a mysql database and visually representing it in a line graph. Below were the graph is displayed on the webpage i want to put in a textarea that offers a feedback message based on the data shown in the graph....

PHP- Display data in textarea

php,mysql,textarea
My goal is to display all emails inside a text area. <?php $q = "SELECT * FROM `Clients`"; $userData = mysql_query($q); while($user = mysql_fetch_assoc($userData)){ echo $user['Email']; } ?> it should echo all info into here: <input type="text" name="text" > I get the information fine from the DB, but im not...

How to resize textarea depending on the parent element

javascript,jquery,html,css,textarea
So I need to resize the textarea in this form to take the whole available space in the box depending on the parent element (#wrapper). How do I do that? I will exactly put the negative number calculation more precise when I am sure how much text will go there....

Escaping apostrophies and other characters in text area

php,html,forms,escaping,textarea
So I have found that this form I have just falls apart and doesn't even submit the content up until the first apostrophe when someone types in an apostrophe to this text area. How do I go about escaping the contents so they make it into my MySQL table? Thanks!...

JSON data not pulling through for textarea input control

javascript,json,html5,textarea,html-input
I am currently trying to build up some html via javascript and when I try to assign the value attribute of my textarea input control it does not seem to want to pull through, the textarea becomes blank when loaded. Values seem to pull through for normal text type input....

Replace n-th tab character with a string using Javascript/jQuery

javascript,textarea
I have a line of items in Excel, and when I copy them in a textarea, I have several tab characters. I use this on purpose. Is there a way to replace n-th tab characters with a new line (each) and insert a specific word for each tab? Here is...

how to prevent unclearing a textbox when selection is made?

javascript,onclick,textarea,selection
I'm trying to build a texteditor and for that I'm using a textarea to fill in my text My problem is when I click a button the textarea selection is gone. Here is some code to show the problem: <!DOCTYPE html> <html> <body> Address:<br> <textarea id="myTextarea"> California Road </textarea> <p>Click...

Detection of textarea value chage

javascript,jquery,textarea,onchange
How can I detect, that value in my textareaId has changed when the change was caused by javascript? eg. $("#buttonID").on("click, function(){ $("#textareaID").val("lorem ipsum"); }); $("#textareaID").change(function(){ //not working }); $("#textareaID").bind('input propertychange', function(){ //not working }); ...

Making a list in HTML from value of textarea

javascript,html,textarea
I need a help to make a list using JavaScript. What I’m trying to do is if user clicked submit button elements in textarea making a list in HTML. HTML: <body> <div class="container"> <div id="main"> <img src=""> </div> </br> <div class="box"> <h3>Guest List:</h3> <textarea id="text"></textarea> </br> <button id="submit" onclick="submit()">Submit</button> </div>...

Extjs5 Textarea Resizing

resize,textarea,extjs5
I have the following form defined: Ext.define('Admin.view.messaging.MsgDataForm',{ extend: 'Ext.window.Window', xtype: 'msgdataform', title: 'Compose Practice Message', defaultFocus: '[name=subject]', modal: true, layout: 'fit', closable: false, width: 700, items: [{ xtype: 'form', layout: 'anchor', fieldDefaults: {labelWidth: 60,labelAlign: 'right',anchor: '100%'}, padding: 10, items: [{ xtype: 'fieldcontainer', layout: 'hbox', fieldLabel: 'Date', items: [{ xtype: 'datefield',...

htmlentities() does it remove return character and carriage return?

php,mysql,pdo,textarea
I am creating a forum with PHP and MySQL with the help of PDO class. I have just started coding the forum and come up with a problem. What I am doing is that $post_body = htmlentities($_POST['post_body']); get the user input like this and then send this to my function...

How define textarea content on form edit (Symfony2/TWIG)

forms,symfony2,textarea,twig,value
I want to display a specific content in my editForm textarea so I try like text field but it doesn't work : {{ form_widget(edit_form.description, { 'attr': {'value': 'content'} }) }} {{ form_errors(edit_form.description) }} How can I do it in TWIG ?...

Understanding of css textarea offsets

html,css,textarea,typography
I made a simple example of textarea on jsfiddle with font-size and line-height. JSFiddle textarea textarea { font-size: 20px; line-height: 4; height: 260px; } <textarea> A A A </textarea> 1) How does browser calculate the AREA_1 height and the AREA_2 height? Why are they different? 2) How does browser calculate...

tag not not showing up

html,textarea
I'm trying to make myself a file manager, and I managed to make an "edit file" function in PHP. In the main page I do have a textarea, but when I want to edit the main page "source", the text stops exactly where the textarea tag closes (</textarea>) Here's a...

Textarea with font-size:30px still autozooms when activated on mobile

html,css,mobile,textarea,zoom
As I understand it, setting a text input's font-size to a size greater than 16px, is supposed to disable the autozoom effect that happens when you activate the text input on a mobile device. I set the font-size to 30px, but the autozoom effect is still there. Tested on Chrome,...

JavaFX TextArea get caret position from coordinate

java,javafx,textarea,javafx-8
Is it possible to get the caret position (an int) at a screen coordinate (2 double) in JavaFX TextArea?

textarea $_POST into MySQL with PDO

php,mysql,post,pdo,textarea
I'm trying to post a textarea value to a mysql table... alongside a few other fields & datatypes, using PHP's PDO. All other fields insert appropriately, when I remove the textarea field ('desc') from the insert or update. When I include the textarea ('desc') in my prepared statement... the query...

how to set css and html in textarea [closed]

html,css,textarea
Is it possible to set a mark (html) in textarea? Because (I think thats for everyone clear) if you set: <textarea><mark>this text has a mark</mark></textarea> that this not works Is it just possible to give an element in a textarea an exact color?...

Create textarea with same style as angular validation

javascript,angularjs,textarea
I'm working on an angularjs project, and currently I'm in the form validation phase. I know that textareas don't work the same as <input>s do, but is it possible to get the same rounded corner? And if possible the same red border when it's invalid? Specifically rounded corners, and the...

Whitespace in textarea

php,textarea,whitespace,simple-html-dom
I build an array of URLs from the content of a textarea, than process it with simple php dom. I get this error: Warning: file_get_contents(http://www.example.com ) Obviously, there is a whitespace at the end of the URL (which is the last in the array and the last in the textarea)...

Adding psuedo elements to