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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:59:49+00:00 2026-05-15T11:59:49+00:00

I am trying to make a table inside a table so I can organize

  • 0

I am trying to make a table inside a table so I can organize stuff in the right place. But I simple cannot set the table width. Here is a picture of the table

alt text

and circled in red is the table inside table that I’ve created, it has one row 3 columns:

alt text

and here is the code I’ve used to create the 2nd table:

// attack type
    var farmTableAttack = dom.cn("table");

    var ftableBodyAttack = dom.cn("tbody");

    farmTableAttack.style.tableLayout = "fixed";

    farmTableAttack.width = "20px";

    ftableBodyAttack.setAttribute("colspan", 4);

    ftableBodyAttack.setAttribute("width", 50);

    tableRow = dom.cn("tr");

    tableCol = dom.cn("th");

    tableCol.setAttribute("colspan", 2);

    tableCol.innerHTML = "Attack: ";

    tableRow.appendChild(tableCol);

    tableCol = dom.cn("th");

    tableCol.setAttribute("colspan", 1);

    tableCol.innerHTML = "N";

    var Button = createInputButton("checkbox");

    Button.id = "attackTypeN";

        Button.checked = GM_getValue("checkBoxAttackType_"+suffixLocal, "tabela") == "normal";

        Button.addEventListener("click", function() {

            if (Button.checked) {
                Button.checked = false;
                GM_setValue("checkBoxAttackType_"+suffixLocal, "tabela");
            }
            else if (document.getElementbyId("attackTypeA").checked == true) {
                document.getElementbyId("attackTypeA").checked = false;
                GM_setValue("checkBoxAttackType_"+suffixLocal, "normal");
            }

                }, false);

    tableCol.appendChild(Button);

    tableRow.appendChild(tableCol);


    tableCol = dom.cn("th");

    tableCol.setAttribute("colspan", 1);

    tableCol.innerHTML = "A";

    var Button = createInputButton("checkbox");


        Button.id = "attackTypeA";

        Button.checked = GM_getValue("checkBoxAttackType_"+suffixLocal, "tabela") == "assalto";

        Button.addEventListener("click", function() {

            if (Button.checked) {
                Button.checked = false;
                GM_setValue("checkBoxAttackType_"+suffixLocal, "tabela");
            }
            else if (document.getElementbyId("attackTypeN").checked == true) {
                document.getElementbyId("attackTypeN").checked = false;
                GM_setValue("checkBoxAttackType_"+suffixLocal, "assalto");
            }

                }, false);

    tableCol.appendChild(Button);

    //append the row in the table
    tableRow.appendChild(tableCol);

    ftableBodyAttack.appendChild(tableRow);

    farmTableAttack.appendChild(ftableBodyAttack);

I want the second table to be inside this place (this is the original table without the 2nd table coded into it):

alt text

I simple don’t know what to do.

another option would be to fix the stuff inside that circle region of the original table without having to use another table, I just don´t know how to do that.

dom.cn:

var dom = new DOMUtils();

//DOM functions

function DOMUtils(doc, ctxt, html) { // from FranMod

    this.cn = function(tag, html) {

        var elem = this.document.createElement(tag);

        if (html)

            elem.innerHTML = html;

        return elem;

    }



    this.ct = function(text) {

        return this.document.createTextNode(text);

    }



    this.id = function(id) {

        return this.document.getElementById(id);

    }



    this.tag = function(tag) {

        return this.document.getElementsByTagName(tag);

    }



    this.xs = function(xpath) {

        var res = this.document.evaluate(xpath, this.context, null,

                XPathResult.FIRST_ORDERED_NODE_TYPE, null);

        return res.singleNodeValue;

    }



    this.xa = function(xpath) {

        var arr = [];

        var xpr = this.document.evaluate(xpath, this.context, null,

                XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

        for (var i = 0; item = xpr.snapshotItem(i); i++)

            arr.push(item);

        return arr.length == 0 ? null : arr;

    }



    this.xo = function(xpath) {

        var ret = this.document.evaluate(xpath, this.context, null,

                XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);

        return ret; //no snapshot

    }

    this.find = function(xpath, xpres, doc) {

        if (!doc)

            doc = document;

        else if (typeof doc == 'string')

            doc = cn('div', doc);

        var ret = document.evaluate(xpath, doc, null, xpres, null);



        return xpres == XPFirst ? ret.singleNodeValue : ret;

    }

    this.get = function(id, doc) {

        if (!doc)

            doc = document;

        return doc.getElementById(id);

    }

    if (!doc)

        doc = document;

    if (!ctxt)

        ctxt = doc;

    if (html) {

        this.document = doc.implementation.createDocument('', '', null);

        this.context = doc.createElement('div');

        this.context.innerHTML = html;

        ansDoc.appendChild(this.context);

    } else {

        this.document = doc;

        this.context = ctxt;

    }

}
  • 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-05-15T11:59:50+00:00Added an answer on May 15, 2026 at 11:59 am

    well if all fails take the three items. put the cell to display block.
    put each item into a div with css float: left; works for me …

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

Sidebar

Related Questions

Can someone tell/show me how to use PHP inside PHP. I'm trying to make
Trying to make a make generic select control that I can dynamically add elements
I'm trying to make the case for click-once and smart client development but my
I'm trying to make tables inside tables in WORD. of course in finall program
I'm trying to make a SELECT where I need to select a specified table
Trying to make a MySQL-based application support MS SQL, I ran into the following
Trying to make a generic PL/SQL procedure to export data in specific XML format,
Trying to make a web service call to an HTTPS endpoint in my Silverlight
I'm trying to make a data bound column invisible after data binding, because it
I'm trying to make a context menu for a control that is linked to

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.