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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:48:25+00:00 2026-06-15T19:48:25+00:00

I have to write a single page application which will use the same 3

  • 0

I have to write a single page application which will use the same 3 forms all over the app, just the action of each one will change. Labels/Inputs will be the same, etc…

I want to make my app fast and very responsiveness, thus, i am wondering if it may be a good idea to dinamically generate the FORM through Javascript each time it has to be loaded, instead of downloading it as HTML from the server.

So, is there any good practice for generating DOM objets throught Javascript ? Is there any way to download the HTML code of each FORM the first time the app is loaded ? Or do I have to build them each time through DOM objets with JS?

Any good practice over here ? I am using node.js, knockout.js, jquery.

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-06-15T19:48:26+00:00Added an answer on June 15, 2026 at 7:48 pm

    You’re using knockout, so just have the form as a knockout template:

    <script type="text/html" id="MyForm">
       <!-- labels and inputs and other form elements here -->
    </script>
    

    then you can use it later in your page like

    <form class="foo" data-bind="attr: { action: myAction }, template: 'MyForm'></form>
    

    myAction will be an observable or plain property of the model that you pass to ko.applyBindings, like

    ko.applyBindings({ action: '/submit/stuff' }, $('form.foo')[0]);
    

    Knockout has great tutorials and great documentation so check that out too.

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

Sidebar

Related Questions

I'm working on an application so i have write an dll which contain a
I have to write a SNMP module which monitor a certain server application that
I have a custom error page in my MVC application that's just ~/error/ but
I have created a form in my web application which has only a single
I'm working on a mobile website (it's not a single page app) which has
I have to write an algorithm that find the path in DAG with single
I have write my own view Bar, which extends LinearLayout . My bar has
I'm writing a simple web app in PHP that needs to have write access
I have an asp.net page which needs to return an object with a one-to-many
In a blog application (which I have mostly built following a tutorial), I would

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.