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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:03:44+00:00 2026-06-07T01:03:44+00:00

is there a way to do this? Im not to good with javascript brackets

  • 0

is there a way to do this? Im not to good with javascript brackets etc…

item: ($('input#title'+id).val(),$('input#qty'+id).val(),$('input#price'+id).val()),

I tried the above but it only gives me the last values,

Firebug gives me:

item_1  7
item_2  7
item_3  7
item_4  7
item_5  7

What im after is:

item_1  Burgers,3,12.50
item_2  Sandwiches,7,7.50
item_3  Fries,10,5.50
item_4  Drinks,10,2.50
item_5  Pancakes,12,7.50

I want to do it this way because it just would be easier to grab that csv array and then insert the data per row.

Im basically inserting the data into a mysql table where i can display it for the client as a food order.

Thanks in advance
Jonny

  • 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-07T01:03:45+00:00Added an answer on June 7, 2026 at 1:03 am

    Use square brackets instead, assuming you want an array.

    item: [$('input#title'+id).val(),$('input#qty'+id).val(),$('input#price'+id).val()],
    

    Here is a post that explains your initial problem:
    Javascript "tuple" notation: what is its point?

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

Sidebar

Related Questions

This may not be possible for the carousel but is there a way to
This is not a big deal, but is there any way in F# to
Is there a particular way to initialize an IList<T> ? This does not seem
I'm not sure if this is possible, is there a way to get the
I'm not sure if this is even possible, but is there a way to
I feel like there's a pretty simple way to do this, but I'm not
I'm sure there's a clean way to do this, but I'm probably not using
I'm not terribly good with Javascript so I'm wondering if there is a better
Is there a way that this full-text searching query could be translated from MySQL
There is this way, of course: OuterClass.this . But that's very clumsy. Ideally, there'd

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.