Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9168315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:35:56+00:00 2026-06-17T15:35:56+00:00

The following code is supposed to, on click of <span class=edit_submit></span> , get the

  • 0

The following code is supposed to, on click of <span class="edit_submit"></span>, get the contents of the textarea and send it, via POST, to edited_page.php, and then display the contents of edited_page.php. At the moment, I don’t believe the function is even running. Any ideas?

Fiddle is here.

$('.edit_submit').on('click', function () {
                $parent = $(this).parent()
                $textarea = $(this).siblings(".el-rte").child(".workzone").child("textarea");
                $text = $textarea.val();
                $id = $textarea.attr('id');
                $parent.html("images/load.jpg").load("edited_page.php", {location: $id, content: $text, page: "<?php echo $page; ?>"});
            });

HTML:

<div id="main">
    <div class="el-rte">
        <div class="workzone" style="height: 400px;">
            <textarea id="main" class="edit_area" style="display: none; height: 400px;" name="main">
                &lt;b&gt;Hello. &lt;/b&gt;&lt;i&gt;This is sam &lt;/i&gt;&lt;u&gt;Testing this website&nbsp;&lt;/u&gt;
            </textarea>
        </div>
    </div>
    <span class="edit_submit" style="background:black;">Save Edit</span></div>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:35:57+00:00Added an answer on June 17, 2026 at 3:35 pm

    here is the working fiddle… there is no child() method in jquery i used children()… and fixed issues that was there in your fiddle

    $('.edit_submit').on('click', function () {
               $parent = $(this).parent()
               $textarea = $(this).siblings(".el-rte").children(".workzone").children("textarea");
               $text = $textarea.val();
               $id = $textarea.attr('id');
               alert($id);
               $parent.html("images/load.jpg").load("edited_page.php", {location: $id, content: $text, page: "<?php echo $page; ?>"});
            });
    

    AND INSTEAD OF GOING THROUGH CHILDREN AND SIBLINGS..you can just use find()

    $textarea = $parent.find('textarea');
    

    updated

    fiddle

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code is supposed to perform a click function on each element in
The following code is supposed to find electors that do not have a postal
The following code is supposed to make the right 60% of the display red.
I am creating a SMS app the following code is supposed to: check if
Given the following code (it's supposed to write helloworld in a helloworld file, and
Suppose I have following code package memoryleak; public class MemoryLeak { public static int
I have the following JQuery Code concerning my tabs : $(#onglet>ul>li).click(function(){ $(#onglet ul li).removeClass('Selectionne').addClass(OngletPrincipal);
the following code is supposed to replace the system color that's used for window
I have the following ajax call: $(#welcome a.close).click(function(e) { $.ajax({ type: GET, url: /visitors/hide_welcome,
i've the following code, it's supposed to check if a variable from a DataList

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.