0

Hi,

My site: http://www.orchot-hagilboa.com/index.php?mid=1

My jquery form is working properly in most areas except where i have an online wysiwyg editor.

If you look at the right side of the site, you will see the editor. It creates a textarea form field.

When i send the form, the reply_desc (textarea name) is empty.
I do an alert on that and you can see its empty as well.

The way I grab my textarea is:

var comment = jQuery('textarea[name=reply_desc]'); 
        alert(comment.val());

To take the value i do the following:

if (comment.val()=='') {
                    var error = true;
                    comment.addClass('hightlight');
                    return false;
                } else comment.removeClass('hightlight');

If everything is ok, i sent it to get processed in my php page, but it doesnt even get there because the reply_desc is empty.

Can someone tell me why it is not working with the editor, yet it works fine with a basic <textarea> field???
thanks

3
Contributors
8
Replies
9
Views
7 Years
Discussion Span
Last Post by alexhernandez
0

Pretty sure you could go with.
Alert("editor value-->" + comment);

no need for the .val() bit.

HTH

0

im still getting an empty value.
sending the form (textarea) the regular way works just fine, using $_POST.
I am not sure why its not working with jQuery.
any ideas?

0

nope. still empty.

Hi,

before sending your form you need to explicitly set the value of your form field with the rich text editor.

like:

document.forms["formname"].fieldName. value = $(RTObject).value //it depends on what editor you are using.

after that you can submit the form.

HTH

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.