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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:27:41+00:00 2026-06-15T21:27:41+00:00

I am working on building an application which has a few HTML components. Use

  • 0

I am working on building an application which has a few HTML components.

Use Case:

I am trying to achieve something similar what is present here. I want to call the HTML components on click of a menu and apply some actions like drag and resize, etc.

Research:

I was advised to take an object-oriented approach for building the application and hence while going through Google came across class.js for JavaScript inheritance.

I went through the initial tutorials, but I am not sure how and where can I store the HTML initially that will hold the structure for the HTML components?

In the reference application they have used backbone.js and require.js, but I am a bit short on time to learn these.

My Work So Far:

What I have tried is creating a file components.js and creating the outer HTML structure for a component like this:

var textBox = '<div class="structure-textBox">
               <div class="editable">
                <p><span style="font-size:20px;"><span style="font-family: arial,helvetica,sans-serif;"><strong>Text Box</strong></span></span></p>
                <ol>
      <li><span style="font-size:14px;">Double Click on the <strong>Text Box</strong> to Edit Text.</span></li>
      <li><span style="font-size:14px;">For easy use of the text editor click on the "i" (to the left of the x close) and watch a 30 sec video tutorial.</span></li>
    </ol>
    <p><span style="font-size:14px;"><span style="color:#7cba0c;">Enjoy web designing with GoBiggi.</span></span></p>
    <p><span style="font-size:14px;">Click on the <a href="#."><strong><u>Design Assistance</u></strong></a> link for further help.</span></p>
  </div>
</div>';

This is a text box stored in a JavaScript variable that I want to add when user clicks on a menu. But how can it be achieved using class.js’s inheritance pattern?

I have a canvas page created and menus for the components. Now I am stuck at this part of getting the html content and displaying it on the canvas.

  • 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-15T21:27:42+00:00Added an answer on June 15, 2026 at 9:27 pm

    I don’t see that what you’re asking has anything to do with inheritance.

    There are several simple ways to put something on your web page using JavaScript.

    For instance, if you have the following on your page somewhere <div id='target'></div>, you could write this:

    var textBox = '<div class="structure-textBox">
                   <div class="editable">
                    <p><span style="font-size:20px;"><span style="font-family: arial,helvetica,sans-serif;"><strong>Text Box</strong></span></span></p>
                    <ol>
          <li><span style="font-size:14px;">Double Click on the <strong>Text Box</strong> to Edit Text.</span></li>
          <li><span style="font-size:14px;">For easy use of the text editor click on the "i" (to the left of the x close) and watch a 30 sec video tutorial.</span></li>
        </ol>
        <p><span style="font-size:14px;"><span style="color:#7cba0c;">Enjoy web designing with GoBiggi.</span></span></p>
        <p><span style="font-size:14px;">Click on the <a href="#."><strong><u>Design Assistance</u></strong></a> link for further help.</span></p>
      </div>
        </div>';
    document.getElementById('target').innerHTML = textBox;
    

    For best results, I would suggest learning to use a library like jQuery. These tools are designed to make it easier to manipulate the HTML of the page, among other things.

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

Sidebar

Related Questions

So I am building a small application that has a keyboard and a few
Using CakePHP 2.2, I am building an application in which each client has it's
I'm working on building an android application which requires different levels of authentication, and
I'm currently working on redesigning an application which is building a model from input
I'm building a WPF application and working with the MVVM pattern. I have 4
I am working on integrating Assetic into an application that I am building. The
I'm currently working on a project that is building a java-based desktop application to
I'm currently working on building a java web app. I've been looking to use
I'm building an application which uses Ruby+RMagick to composite PNG images onto various JPEG
I'm working on a Java web application in which files will be stored in

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.