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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:37:34+00:00 2026-05-25T14:37:34+00:00

Thanks for helping to solve a problem at: .val() and .text() don't work? Now

  • 0

Thanks for helping to solve a problem at:
.val() and .text() don't work?

Now I have a new question, look at my problem in: http://jsfiddle.net/arlopa/B5aTC/

When you click on “submit”, this appears in the textarea:

**content 1acontent 2a**

If I email this text, the user can’t read it!

I want to fix it so that it’s formatted like:

(content 1a) ( content 2a )

OR

content 1a

content 2a

OR

content 1a | content 2a

Thanks.

  • 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-05-25T14:37:35+00:00Added an answer on May 25, 2026 at 2:37 pm

    Your JQuery selector is causing the formatting issue. What you can do is get a collection of the elements and then iterate over them using .each() to build up the way you want to display them.

    Here is your javascript with the items updated to display with a pipe, and with your original total code:

    $('#shopform').submit(function() {
        var items = '';
        var tprice = $('.simpleCart_total').text();
    
    $.each($('.simpleCart_items'), function(index, value) { 
        items = index === 0 ? value.textContent : items + ' | ' + value.textContent;
    });
    
        $('#itemsinfo').val(items);
        $('#totalprice').val(tprice);
        return false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Thanks to everyone out there helping newbies like me. So far I have this:
Hello there freaks & geeks. Here comes my question again, thanks for helping!. Lets
Thanks for helping with this. I have a script that checks logins and then
Hey, first of all thanks for helping me out with this (probably stupid) question
Alright I'll try to explain my problem. Thanks for helping Simsoft. Frame 1 has
Thanks for helping me answering this question, I want to update the user's location
Rails newbie, thanks for help with this hopefully basic JSON type question.... I have
thanks for helping me setting my cron jobs, crontab has really been a gold
Sorry if this is too simple, but thanks in advance for helping. This is
thank you everyone for helping me out with this. i am new to ruby

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.