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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:56:47+00:00 2026-06-16T19:56:47+00:00

I have a page with a variable number of tables which are dynamically generated.

  • 0

I have a page with a variable number of tables which are dynamically generated. Each table lists a group of “products” which the user can add/edit/delete. Underneath each table is a button. I want each button to save the products in the table above it to a “package”, which is just a group of products. When the button is clicked, I want it to launch a jQuery dialog form where a user can enter a name and description for the package that they’re creating.

Is there a way for me to get a reference to the button that launched the jQuery dialog in the first place within the scope of the dialog’s “buttons” functions? That way, when the user clicks the “save” button in the dialog, I can submit both the form that is contained in the dialog itself (name and description) AND also submit the product data that is contained within the table closest in the page markup to the particular button that the user clicked to launch the form?

Edit: I forgot to mention that the WHOLE page (all tables) are already contained within one form element. This is because a user can also save all of the products in the three tables as an “oportunity”, which is a group of groups of products. Here is a little pseudo html to show the layout:

<form>
    <table>
    </table>
    <table>
    </table>
    <table>
    </table>
</form>

For the purpose of allowing user to save all products in all of the tables to an “opportunity”, I need to leave all three tables wrapped in one form tag. However, when a user clicks the “save package” button under a particular table, I want to only submit the data in that one table and the name and description entered by the user in the dialog.

  • 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-16T19:56:48+00:00Added an answer on June 16, 2026 at 7:56 pm

    define a global variable in js and set its value if one of the button’s clicked.
    in this example “id” is used .

    $('.button').click(function(){
       id = $(this).index();
       $('#dialog').fadeIn('1000');
        return false;
    });
    

    maybe this can be helpful :
    http://jsfiddle.net/Vm7PL/1/

    also you can use jquery-ui dialog box .

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

Sidebar

Related Questions

I have a MySQL table which contains page content, each line of content has
The Scenario I have a table on a web page that is dynamically generated
I have a JSF page which has a variable number inputText elements containing numeric
I have a Gridview in my page Which I can Select each row i
I have a page-scoped component, which has an instance variable List with data, which
Can you setup a variable for javascript in one page and have another page
I have stored page contents (tables, plain text, images and paragraphs) into a variable.
There is a JSP page in which i have an ArrayList variable. I need
I have a generated table which i need when press button on 6th column
I have a page called index.html which takes in a few variable from the

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.