FAQ Database Discussion Community


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...

Is it possible to set different colors for different lines in a javafx textField/Area?

java,colors,javafx,textarea,textfield
I know that you can set a color of a whole textArea/Field by setting the style of the node to be -fx-text-fill: red; but is there a way to set the color of one single line instead of all of the lines while still keeping the textArea/Field editable?

Is there any way to set maximum length constraint on each row of a textarea field?

html,textarea
I need to fulfill a unique requirement from my client. Attached here is the image, I need to force the user not to enter more than 15 digits per row of a <textarea> field without any spaces. Is this possible with HTML? I thought of using cols attribute but then...

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,...

Add borders into a textarea [closed]

html,css,textarea
I need to reproduce this contact form. It's already done, but i got some problems for the textarea. Seems I need to put kinds of "hr" into the textarea, or... or I don't know. Any help would be welcome....

Textarea name given back undefined

php,html,textarea
Getting back $message is undefined. I've tried switching $_POST['message'] to $_POST['send']. it works, but for some reason it won't work with the text-area. I even tried to switch the button type from button to submit. It didn't help. This mistake's given me a real headache. <?php $message = $_POST['message']; ?>...

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...

Print text in html textarea tag

php,html,textarea
I have a page that collects data from a database then prints it into another form so the user can update it. It works with the input box, but not the textarea box. Here is the code in the form: <textarea id="description" name="description" value="<?php echo $row['description'];?>"> </textarea> I'm pretty sure...

How to delete a selection of textarea

javascript,textarea
I'm making a a simple texteditor and for that I'm using a function which gets the selected text of a textarea. My problem is not getting the selected text but when i add some tags to the selected text, for example bold or italic, it appends. So what I want...

Get the lines from textarea and insert to mysql [closed]

php,mysql,insert,textarea
I've been trying to add multiple rows to mysql using textarea. The thing is that i can get all the lines from the textbox but i want to separate them into values using " | " as a separator. $invalid = 0; $inserted = 0; $totalaccounts = 0; $lista =...

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...

Convert HTML text area value to jqmath formula

javascript,html,textarea,jqmath
I am new to jqmath; I have contained a textarea field in my HTML: <textarea cols="30" rows="2" id="mathSrc1"></textarea> I will set mathematical formula in the text area so that it will be displayed in <div> tag: <div id="mathTgt1"></div> This code is available in http://mathscribe.com/author/jqmath.html. But I don't know how to...

Preserve newline in text area with Ruby on Rails

ruby-on-rails,ruby,textarea
To practice Ruby on Rails, I am creating a blog which includes a text area (following Mackenzie Child's tutorial). When the text is submitted, all of the newlines are removed. I know variations of the question have been asked already, but I have been unable to replicate any of the...

Adding psuedo elements to 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...

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"...

How many characters can “javascript var keyword” store?

javascript,textarea
I want to create a variable to store the value of textarea by using var keyword. But I don't know exactly about the maximum characters which "var" can store. Can you help me?...

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...

Receiving content of textArea from another class in java (With Code) [closed]

java,class,textarea
I am working on a project which has two classes MainGUI and MainTest. SO my problem is that I want to print the result from Calculations done in MainTest class on the testArea of MainGUI. What I did is that, MainGUI obj=new MainGUI(); \\declared in MainTest class obj.myTextField.setTest("Result"); \\Result from...

How do I allow bootbox to accept multiple lines of code?

javascript,modal-dialog,textarea,bootbox
This code works: <script type="text/javascript"> bootbox.alert("Hello world!"); </script> This code doesn't work: <script type="text/javascript"> bootbox.alert("Hello world!"); </script> If you're gonna ask why I need it like the second one, it's because that value will be based off of a textarea which has multiple lines of code, I somehow need to...

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...

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...

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....

Auto scroll down a TextArea

java,scroll,javafx,textarea
I have a TextArea that doesn't scroll down when I add text in it. I thought using this answer, but my TextArea is connected to a StringProperty like this : consoleTextArea.textProperty().bind(textRecu); So the answer doesn't work for me, is there another way to make my TextArea scroll down every time...

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...