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 7826035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:14:56+00:00 2026-06-02T09:14:56+00:00

<table border=0 class=commentbox> <tr> <td> <div id=comment-f78d0b00-a008-473d-b647-a4a103ee3778></div> <input type=button class=’btnReply’ id=reply-f78d0b00-a008-473d-b647-a4a103ee3778 value=Reply/> </td> </tr>

  • 0
 <table border="0"  class="commentbox">
   <tr>
     <td>
          <div id="comment-f78d0b00-a008-473d-b647-a4a103ee3778"></div>
         <input type="button" class='btnReply' id="reply-f78d0b00-a008-473d-b647-a4a103ee3778" value="Reply"/>

     </td>
 </tr>
</table>

  $(".commentbox .btnReply").live("click", function () {
            //  $(this).hide();
            // i = 1;
            id = $(this).attr("id").split("-")[1]
            alert(id);
            var strDiv = 
             "<input type='text' class='txtCmnt' id='txtReply-" + id + "' /> 
        <input type='button' class='btnSave' value='Save' id='btnSave-" + id + "' /> ";
            $("#comment-" + id).append(strDiv);


        });

i want the f78d0b00-a008-473d-b647-a4a103ee3778 to come after split rather alert is giving
f78d0b00

I have tried to change id = comment_ f78d0b00-a008-473d-b647-a4a103ee3778 and split

id = $(this).attr("id").split("_")[1],but it doesnt work.

Edited

Input – container-f78d0b00-a008-473d-b647-a4a103ee3778

Output after split f78d0b00-a008-473d-b647-a4a103ee3778

  • 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-02T09:14:57+00:00Added an answer on June 2, 2026 at 9:14 am

    A slightly convoluted means of achieving your end-result:

    // splits the supplied string by the hyphen '-' character
    var string = 'comment-f78d0b00-a008-473d-b647-a4a103ee3778'.split(/-/);
        // removes the zeroeth/first element from the string array
        string.shift();
        // joins the remaining elements from the string back together
    var newString = string.join('-');
    console.log(newString);​
    

    JS Fiddle demo.


    Edited to turn the above into a function:

    function splitString(haystack, needle){
        if (!needle || !haystack){
            return false;
        }
        var string = haystack.split(needle);
        string.shift();
        return string.join(needle);
    }
    
    // the first argument is the string you want to work on,
    // the second is the character you want to split on
    // f is the variable that will hold the new string
    var f = splitString('comment-f78d0b00-a008-473d-b647-a4a103ee3778','-');
    console.log(f);​
    

    JS Fiddle demo.

    References:

    • join().
    • shift().
    • split()
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

html code <table border=0 class=commentbox> <tr> <td>Some Item text </td> </tr> <tr> <td> <div
HTML: <table border=1px> <tr> <td colspan=2> <div class=commentLink> <a onclick=ShowBox.call(this); return false; href=#>Comment</a> </div>
<%var i=1;%> <%foreach (var commentitem in item.commentsModelList) { <table border=0 class=commentbox> <tr> <td> <%:
I would like to have a border for the table with class name as
<html> <style type="text/css"> .table { display: table;} .tablerow { display: table-row; border:1px solid black;}
I have created a php table like so: echo <table border = '0' cellpadding
CSS table tr {border-bottom:1px solid #008999} HTML <table width=100% cellspacing=0 cellpadding=0> <thead> <tr> <th
How can I make a table with a round border, similar to the photo
I want to create a html table with a 1pt black outer border and
I have an HTML table with collapsed and adjacent borders and a standard border

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.