FAQ Database Discussion Community


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 do I set these buttons 'id' values to append in the textarea?

javascript,jquery,html,textarea
I've been given a code which contains wingding characters that relate to a letter different from its normal attached key, and I'm trying to create a program that deciphers them. Unfortunately I can't work out how to add to the textarea, only overwrite the character already there which isn't very...

Get (altered) textarea content from webBrowser element in C#

c#,windows,forms,tinymce,textarea
I've searched the web for 2 days now and am about to give up on this, but I'm soo close to the final solution... so you're my last hope. ;) I have made a little C# application with Windows Forms GUI that uses a webBrowser element to display an HTML...

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

Why does my script not make new lines using keyup?

javascript,textarea,onkeyup
I'm coding a script for my forum which generates a preview of the given string. Here is my js code function MakePreview() { var getText = document.getElementById('inputText').value; document.getElementById('outputText').innerHTML = getText;} Here is my HTML code <article> <h2>What are you doing?</h2> <textarea id="inputText" onkeyup="MakePreview()"></textarea> <br/> <input type="submit" class="button" value="Hello"/> </article> <article>...

How correctly specify the textarea width? Using the cols attribute I obtain different width using different browser

html,css,css3,xhtml,textarea
I have some problem with the definition of the width of a textarea So, I have this situation: <div id="dialogReject" title=""> <table style="visibility: hidden;" id="rifiutaTable" border="0" class="standard-table-cls" style="width: 100%!important"> <tbody style="background-color: #ffffff;"> <tr> <td style="font: 16px Verdana,Geneva,Arial,Helvetica,sans-serif !important">Inserire note di rifiuto</td> </tr> <tr> <td> <textarea style="visibility: hidden;" rows="5" cols="70"...

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

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

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

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

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

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

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

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

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

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

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

Update form validation on right-click cut/paste

javascript,jquery,html,textarea,string-length
I check the length of user input to give feedback before they attempt to submit the form. Here's my code: var $foo = $("#foo"), $span = $("span") $foo.on('keydown keyup change', function(){ $span.text($foo.val().length); }).trigger('change'); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <textarea id="foo">Ipsum</textarea> <small><span></span> characters.</small> This works correctly for input typed. However, if a user cuts...

Asp.net textarea add empty string to the value [closed]

c#,asp.net,webforms,textarea
I have the textarea inside repeater <textarea class="form-control" disabled="disabled" > <%#Eval("value") %> </textarea> and when it's have value appear to have empty string in front and end of my string value Empty string in the inspector How to remove the empty string in front and end of the value (Trim)...

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 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();...

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

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 }); ...

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

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

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

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

making the backround of a javafx textArea clear

java,javafx,textarea
I was looking into this whole text area class in java, I was going to use it in my cool GUI i'm making but, when I was looking to make the background clear the only thing I could find is a method that allows you to set the opaqueness. but...

Keep linebreaks when getting text from