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

  • Home
  • SEARCH
  • 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 9045973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:30:28+00:00 2026-06-16T11:30:28+00:00

I am developing a social website like facebook in php. I have a page

  • 0

I am developing a social website like facebook in php. I have a page for displaying the messages for the user with two links,that is reply and delete at the right bottom corner for every messages in the inbox. My issue is that when i click the reply link another html block should come where user can send the responses back to the sender.I have written the code like this

<div class="msgutil">
   <a href="" id="reply" onclick="return post_reply()" >reply</a>//this method does'nt works

   <a href="delete_message.php?msg_id=<?php echo $row_msg_id;?>">delete</a> //dont check this
</div><!--end msgutil-->

I have inserted the html document inside the post_reply() like this

  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
 </script>

<script type="text/javascript">
function post_reply()
 {
    $("<form id="msgreply" name="msgreply" action="#"> <textarea name="replyfield"    id="replyfield"></textarea> </form>").insertBefore("#reply");
return true;
 }
 </script>

I don’t know why its not working.

  • 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-16T11:30:30+00:00Added an answer on June 16, 2026 at 11:30 am

    You’re using double quotes in a string made with double quotes. This cannot be done, as you keep ending and starting the string again.

    Either surround it with single quotes:

    $('<form id="msgreply" name="msgreply" action="#"> <textarea name="replyfield" id="replyfield"></textarea></form>').insertBefore("#reply");
    //^                                                                                                              ^
    

    or escape the double quotes:

    $("<form id=\"msgreply\" name=\"msgreply\" action=\"#\"> <textarea name=\"replyfield\" id=\"replyfield\"></textarea></form>").insertBefore("#reply");
    //          ^         ^       ^         ^         ^  ^                  ^           ^     ^           ^
    

    You can also use the following HTML:

    <div class="msgutil">
       <a href="#" id="reply">reply</a>
       <a href="delete_message.php?msg_id=<?php echo $row_msg_id;?>">delete</a>
    </div><!--end msgutil-->
    

    and the following javascript:

    $(document).ready(function() {
        $("#reply").click(function(e) {
            $('<form id="msgreply" name="msgreply" action="#"> <textarea name="replyfield" id="replyfield"></textarea></form>').insertBefore("#reply");
            e.stopPropagation();
            e.preventDefault();
        });
    });​
    

    to get the same result.

    Here’s a JSFiddle demo.

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

Sidebar

Related Questions

I'm currently developing a large site that handles user registrations. A social networking website
I'm developing a website that connects to Facebook. The website uses the comments social
I am developing a feature for my social networking website that allows users to
We are developing something like a social networking website. I've got task to do
I'm developing a social network where each user is registered through Facebook. So I
I am developing a social media monitoring application. Currently, we are entering Facebook page
I am developing a social web application in php/mysql, I would like to hear
I'm developing a small social networking app that makes use of something like profile
I am developing a PHP application which has user accounts, I have followed best
I'm developing an app that scrapes a website for Google+1's, Facebook shares and Tweets.

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.