textarea

multiple textarea with same name and PHP treatment

只谈情不闲聊 提交于 2019-12-02 11:06:16
问题 I have a dynamic form in which i can add and remove textarea. The name of textareas is MyTextarea[] <textarea style="display:inline;" name="MyTextarea[]"></textarea> <textarea style="display:inline;" name="MyTextarea[]"></textarea> So when I want to treat this textarea with PHP i'm doing a : echo $_POST['MyTextarea']; So a Array is display on the screen, up to now it's ok So I do a print_r($_POST['MyTextarea']); and I have again the same result : Array I want to know if it's possible to have

How to drag textarea and inputs using jquery

柔情痞子 提交于 2019-12-02 10:35:43
I am using jQuery UI draggable to drag elements but it does not seem to work on textarea and inputs as they are focused whenever I click on them. Here is a JSbin Demo of the problem. HTML <textarea class="movable" placeholder="I am textarea. Try to move me"></textarea> <h2></h2> <div class="movable">I am a DIV. Try to move me</div> JS $('.movable').draggable(); I think I am missing some parameter in draggable method which can do this for me. Looks like I have found solution to this problem after some googling. Posting it here to help others. Two steps needed: jQuery Draggable disables

MySQL insert from a textarea to multiple rows

妖精的绣舞 提交于 2019-12-02 10:31:54
I have a simple form which is a textarea and I need to insert each lines in my textarea into a different rows in MySQL. HTML code: <html> <form method="POST" action="insert.php"> <textarea name="url" rows="10" ></textarea> <input type="submit" name="submit" value="Enter"> </form> </html> PHP Code: <?php $link = mysql_connect('localhost', 'root', ''); if (!$link) { die('Not connected : ' . mysql_error()); } $db_selected = mysql_select_db('insert', $link); if (!$db_selected) { die ('Can\'t use this database : ' . mysql_error()); } $textarea = mysql_real_escape_string($_POST['url']); $array =

How to access the TextArea value from a content page

做~自己de王妃 提交于 2019-12-02 10:19:26
I have a TextArea control in my content page which is inside an UpdatePanel: <asp:UpdatePanel runat="server" ClientIDMode="Static" ID="upTaskDetailRight" UpdateMode="Conditional"> <ContentTemplate> <div style="width: 98%; padding-bottom: 10px;" class="brClear"> <div style="width: 98%; height: 120px;"> <textarea id="taskNotes" runat="server" class="taskNotes" style="width: 100%; height: 100%; scrollbar-base-color: #A0A0A0; scrollbar-base-color: #A0A0A0; scrollbar-3dlight-color: #A0A0A0; scrollbar-highlight-color: #A0A0A0; scrollbar-track-color: #EBEBEB; scrollbar-arrow-color: #FFFFFF; scrollbar

CKeditor with multible dynamic textareas

会有一股神秘感。 提交于 2019-12-02 09:48:58
I have a forms which allows multiple steps to be submitted. When a user clicks "add step" another textarea appears. I am using CKeditor. It works great of the first iteration, but on all subsequent ones, it shows a standard text area. Here is my code: <form method="post" action="process_project.php"> <b>Steps for your project:</b> <div> </div> Step 1 <div id="divWho"> <textarea name="projSteps[]" class="steps" id="1" rows="10" cols="60"></textarea> </div> <div> </div> <input type="button" value="Add project step" onClick="addTextArea();"> <input type="submit" name="submit" value="submit" /> <

IE9 and TEXTAREA newlines

蹲街弑〆低调 提交于 2019-12-02 09:32:34
We display a piece of signed XML in a TEXTAREA. The signing takes into account the whitespace, so it is critical that this is maintained. The user then copies and pastes this into an application that validates the XML... we've not had a problem with this until now... IE9 is rending the text slightly differently. When I copy it into a HEX editor, I can see that IE9 is rendering newlines as 0xA... put it into compatibility mode (or use IE6,7,8, Chrome, Firefox etc.) and it gets rendered as 0xD,0xA I guess this won't effect most people, as it looks ok... but for us it is a royal PITA!!! Anyone

Can you have an html list inside a <textarea> and it look like a list?

无人久伴 提交于 2019-12-02 09:16:35
I tried <textarea rows="10" columns="2"><li>joe</li><li>jerry</li></textarea> to see if I could put an html list in a <textarea> but it just showed as text. Is there any way to show it as a list inside the textarea? You can't have HTML inside textarea s - it's for plain text only. However, you can try using contentEditable for this. The result isn't very good, but you be the judge whether you want to use it or not. Simply use something like this: <div class="editable" contenteditable="true"> <ul> <li>List item</li> <li>List item</li> </ul> </div> The problems with this method is that it's

Can't see components in JScrollPane

情到浓时终转凉″ 提交于 2019-12-02 08:59:55
I'm using a JScrollPane to hold a JTextArea for a large area of text. I add the TextArea directly to the JFrame, it works fine. But I add it to the scrollpane and add the scrollpane, I don't see the textarea. Here's my SSCCE: public class foo extends JFrame{ //gui elements JTextArea chatMonitor = new JTextArea(); JScrollPane textPane = new JScrollPane(); ChatFrame(final String nickname, final String login, final String server, final String channel){ setSize(500,500); chatMonitor.setEditable(false); chatMonitor.setVisible(true); textPane.add(chatMonitor); textPane.setAutoscrolls(true); textPane

I created textarea expander from script but after, it doesn't expands

社会主义新天地 提交于 2019-12-02 08:39:35
I don't know if the title is correct. I created, with one script, a table with 5 textarea with class="expand". This textarea when I write expands but then doesn't works. Is there a method after writing to call the jquery plugin? Before i tried without creating the textarea, I wrote in the html file and it worked. (Info and example on 2 textarea: http://blogs.sitepointstatic.com/examples/tech/textarea-expander/index.html http://jsfiddle.net/V2RLs/2/ (without class="expand") ) But after When i write in the textarea it doesn't expands.Why? This is my script: <script src='js/jquery.textarea

HTML 使用CSS 如何去掉文本聚焦框 HTML 使用CSS 如何去掉文本聚焦框 : outline 值设为none 修改input、textarea输入框placeholder样式

江枫思渺然 提交于 2019-12-02 05:54:57
HTML 使用CSS 如何去掉文本聚焦框 : outline 值设为none 修改input、textarea输入框placeholder样式 兼容性代码: input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color:lightgray; } input:-moz-placeholder, textarea:-moz-placeholder { color:lightgray; } input::-moz-placeholder, textarea::-moz-placeholder { color:lightgray; } input:-ms-input-placeholder, textarea:-ms-input-placeholder { color:lightgray; } 来源: https://www.cnblogs.com/zzz-knight/p/11733092.html