Forum closed. New forum available at http://community.wymeditor.org/

I'm busting my head! Jquery Update textareas

Support forum for WYMeditor.

I'm busting my head! Jquery Update textareas

Postby jonnypixel on Wed Sep 15, 2010 10:20 am

Hi,

I have looked at some of the other posts to try to grasp how i can update multiple textareas on one page using jquery.
But i just don't understand even after like 2 or 3hrs of fiddling and testing.

I have written up an updater script form another tutorial which will post input fields and even textareas fine.

But when i try to post the textarea data with 2 instances of wymeditor It will only POST data from the first textarea.

HTML CODE:

Code: Select all
<tr>
<td>Summary</td>
<td>
<textarea id="summary" class="wymeditor" ><?php echo $summary; ?></textarea>
</td>
</tr>
<tr>
<td>Long Description</td>
<td>
<textarea id="description" class="wymeditor" ><?php echo $description; ?></textarea>
</td>
<input type="" value="Apply Changes" id="save_page" class="button" />



JAVASCRIPT CODE ( Updater ):

Code: Select all
<script type="text/javascript">

$("#save_page").click(function() {
     if (confirm("Click OK to save Data."))
    {
    var txt = $.ajax({
    url: 'updateMYSQL.php',
    async: true,
    type:'POST',
    data:({
    id:$('input#id').val(), 
    Summary:$('textarea#summary').val(),
    Description:$('textarea#description').val()   
    })     
    }).success;   
       // then do something...
     }   
    });
    </script>
   


Thank you to all in advance for your help
John.
jonnypixel
 
Posts: 1
Joined: Wed Sep 15, 2010 10:03 am

Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron