I have this code inside a form of mine:
<textarea>Your message</textarea>
The html content of the tag will be emptied on focus.
I want to run some validation on this field with jQuery. First, the value of this field should not be = "". Secondly, the content of the tag should not be = "Your message".
Anyone knows how I can archive...
I have a on a form of mine. I´m trying to reset the value (the value typed by the user) of this field on a certain event. However, I seem unable to access it both with .val() and .html().
Any advice on this?
...
OK so let's say I have a textarea on the top of my browser and a text input box on the bottom. I want to connect a MySQL database and also whatever I type in the input box to appear in the text area. Sorta like a text RPG...
I know PHP, MySQL, good AJAX, and little jQuery. I just want to know how this is achieved. Thank you.
...
I have a text area. I can set the text of it with
$("#mytextarea").text("foo")
I can prepend to the text area like this:
$("#mytextarea").prepend("foo")
But I cannot prepend to the jquery text() object like this:
$("#mytextarea").text().prepend("foo")
The reason I want to do this is so that if my user gets me to prepend this te...
I have a textarea which users can enter some tags.
I need to limit this tags to 20 tags.
Tags could be enterer this way
maytag1,mytag2,mytag3
What i wrote is this function
function limitTags()
{
var tags = $("input[type=text][name=tags]").val()
var tag = $.trim(tags);
var selected = new Ar...
When I apply Ext.Resizable with parameters wrap: true, handles: 's' to an Ext.form.TextArea with width: 100%, the text area loses its width. More specifically, the width is reset to sth. like default width in pixels. Is it possible to cleanly make Ext.Resizable just not touch width at all and operate on element's height only? I checke...
Is it possible to display HTML character codes stored in a text field in SQL to a textarea without rendering them as their appropriate character? i wasnt & to show up as & (the way it's stored in the table). Or is their a way I should be storing the HTML so I won't need to worry about this?
(site is using PHP)
...
I have a text area in which users can type source code (html/css/js). I want to be able to let them click a "switch to fullscreen" link to make the editor fullscreen.
Of course, this should work on any resolution and must also resize when a users resizes it's window.
I found this plugin, http://plugins.jquery.com/project/fulltextarea, ...
I have a multi-line text box. When users simply type away, the text box wraps the text, and it's saved as a single line. It's also possible that users may enter line breaks, for example when entering a "bulleted" lists like:
Here are some suggestions:
- fix this
- remove that
- and another thing
Now, the problem occurs when I try...
I'm working on the comment leaving system on my blog and everything works fine except I can't get my "comments" text box to become larger. Well, I can, using the command, but it puts the raw html from the rest of the page in the text box. The page displays my form as "Name: [blank input box] Comment: [larger input box, but filled with a...
How do I get my <textarea> to have a height of 100% and work in IE7/6? height:100% works fine in all other browsers but IE just doesn't want to accept anything other than specific values. Javascript is a possible solution.
...
Hi,
I am new to extJs. I want to make the border of a textarea invisible so that it becomes just a blank white space (My purpose is to show it inside a fieldset).
Hoe can I achieve this?
thanks
...
How can I assign text containing \r\n to an ExtJs textarea and get to see line breaks instead of the actual \r\n characters? When I manually press the Enter key and check Firebug, I can see \r\n getting inserted. But if I assign a string containing \r\n to the textarea, it renders as-is.
Any hints would be helpful.
...
TextArea looks like:
<textarea id="MessageContent" name="MessageContent"></textarea>
JQuery looks like:
$("#insert").live("click", function () {
var t = "<img width='" + result.width + "' height='" + result.height + "' alt='" + result.descr + "' src='/Images/" + result.message + "' />";
$("#MessageContent")...
Hi all!
I am trying to resolve an issue in IE7.
My text area has a background image behind it which then scrolls with the text when the text exceeds the height of the text area and begins to scroll with the text.
Anyone know why this is happening and what the solution this would be?
Thanks,
James
...
In the script, sometimes a newline is added in the beginning of the text field (am using a textArea in adobe flex 3), and later on that newline might need to be removed (after other text has been added). I was wondering how to check if there is a newline at the beginning of the text field and then how to remove it. Thanks in advance.
...
Hi, I have a textarea with default text 'write comment...'. when a user updates the textarea and clicks 'add comment' Google chrome does not get the new text. heres my code;
function add_comment( token, loader ){
$('textarea.n-c-i').focus(function(){
if( $(this).html() == 'write a comment...' ) {
$(this).html('');
}
}...
How to check if certain row in textarea is empty?
...
How to check if certain row in textarea is empty with javascript?
<script type="text/javascript" src="../../../js/jquery-1.3.2.min.js"></script>
<script>
$(document).bind('keydown',function (e) {
if(e.which==13) {
function isRowEmpty( idOfTextArea , row ){
return $("#" + idOfTextArea )[0].value.split("\n")[row-1] == "";
}
alert(isR...
When i populate a textarea with text using \r\n (carriage return - newline) the text is formatted improperly [UPDATE: \r\n is what is generated when filling out a textarea, i'm simply pulling from a database what was previously filled in. Also to note, in the production environment i don't seem to have this problem. END UPDATE] For examp...