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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:35:33+00:00 2026-05-18T12:35:33+00:00

I have a web form in SPARK which allow the editing of a Facility

  • 0

I have a web form in SPARK which allow the editing of a Facility class that contains Rooms. When editing the Facility all the Rooms are listed for editing too. The form works fine for editing, but I would like to include a button “Add Room” that adds a new blank room below the existing ones. Any idea how this is accomplished?

Currently I am doing this in my SPARK page:

[All the Facility editing stuff...]
<p>Room</p>
 <div class="small">Enter the rooms associated with this facility.</div>
  <div class="add">
    <div id="room">
      <AddFacilityRoom each="var roomModel in Model.FacilityRooms" RoomModel="roomModel" Index="roomModelIndex" />
    </div>
    <a id="addRoom" class="add" href="events/room/add.mvc">Add a room</a>
  </div>

AddFacilityRoom contains the html elements for editing a room.

I would like add.mvc to create a new empty Room class and inject a new identical (but empty) control below the existing ones. Currently, though it opens a new page when the “Add a Room” button is clicked.

  • 1 1 Answer
  • 1 View
  • 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-18T12:35:33+00:00Added an answer on May 18, 2026 at 12:35 pm

    Ok, I figured this out. I was missing the JQuery knowledge to understand this. The function below:

    $('#addRoom').click(function () {
        var a = $(this);
        a.addClass('loading');
        $.ajax({
            url: a.attr('href'),
            cache: false,
            success: function (html) {
                $('#room').append(html);
                a.removeClass('loading');
            }
        });
        return false;
    });
    

    Plus, the following HTML:

    <div id="room">
     <a id="addRoom" class="add" href="events/room/add.mvc">Add a room</a>
    </div>
    

    Does the trick.

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

Sidebar

Related Questions

I have a web form page Default.aspx, which inherits from a BasePage class that
I have a web form that has 2 radio buttons, depending on which one
I have a web form that contains lots of JavaScript functionalities to manipulate the
I have web form in which I have to make sure that 'SUBMIT' button
I have a web form that contains a usercontrol and I would like to
I have web form with a panel which has form elements in side it.
I have a web form that binds a DataGrid to a, normally, different data
I have a web form that has multiple ListBoxes, TextBoxes, DropDowns. If I put
I have a web form that I am attempting to implement dynamic drop down
I have a web form where I have a textbox in which the user

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.