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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:38:19+00:00 2026-06-18T03:38:19+00:00

I do have a form and table.I am binding the form through the table

  • 0

I do have a form and table.I am binding the form through the table and I am able to do that but my concern is I want to update any of the field from the form but it is not showing in the table instantly.It is showing in the table but after refreshing the page.But I want that is must be dynamic.
the code for the table and the binding the form is as follows:

    <form class="form  form-horizontal" id="serviceactivityForm" data-bind="foreach:items" action="<?php echo $BASE;?>projects/service_activities"  method="post">
                <div class="span3">
                        <input type="hidden" id="data_actid" name="actid" data-bind="value: actid" />
                        <div class="control-group">
                            <label class="control-label labellocation">Subject</label>
                            <div class="controls">
                            <input type="text" id="subject" name="subject" class="inputmargin" data-bind='value: subject' title="Please Enter Subject" required="" style="width:150px"/></div>
                        </div>

                        <div class="control-group">
                            <label class="control-label labellocation">Location</label>
                            <div class="controls">
                            <input type="text" id="location"  name="location" data-bind='value: location' class="inputmargin" style="width:150px"></div>
                        </div>
                    </form>
<form class="form" action="<?php echo $BASE;?>projects/service_activities">
        <div class="datagrid span4">  
            <table class="table table-hover table-bordered selectable " style="width:450px;" id="service_activitiesTable">
                                <thead>
                                    <tr>
                                        <th>Subject</th>
                                        <th>Location</th>
                                        <th>Assigned</th>
                                    </tr>
                                </thead>
                            <tbody data-bind="foreach: items" >
                            <tr data-bind="value:actid" id="service_activity">
                            <td data-bind="text:subject"></td>
                            <td data-bind="text:location"></td>
                            <td data-bind="text:techname"></td>
                        </tr>
                    </tbody>

            </table>
        </div>
    </form> 
    <script type="text/javascript">
        $(function () {
            $("#service_activity").live('click', function () {
                $.ajax({
                    type: 'POST',
                    url: root + "projects/service_activities?json",
                    data: { id: $(this).val() },
                    success: function (o) {
                        ko.applyBindings(new DynamicModel(o.service_activity), document.getElementById("serviceactivityForm"));

                    },
                    dataType: "json"
                });
            });
         });
    </script>

so is there any way to do this..

  • 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-18T03:38:20+00:00Added an answer on June 18, 2026 at 3:38 am

    Can you show your view model and inital binding code?

    At a guess, it’s because you are creating a new viewmodel when you save, and are applying the binding using that. You should be bound to an items property that is an observable array, and you want to be adding to it with the updated values, not over-writing it.

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

Sidebar

Related Questions

I have a form that sends info into a database table. I have it
I want to populate a table form a MYSQL database. I have defined the
I have a DataGridView bound to a table from a .sdf database through a
I have a form that will be populated by a bunch of information from
I have a form/table that is dynamically altered via JS by adding/removing rows (form
I have one form open and then I go to the table and update
I have my form in a table and I use this code to add
I have a form with a table source, the form has a few fields
I have a form with the fields inside table cells. On the last column
I have a form which lets you add names to the table and shows

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.