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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:54:23+00:00 2026-05-26T19:54:23+00:00

I have this long code about a table width some various content. It is

  • 0

I have this long code about a table width some various content.
It is also available at http://jsfiddle.net/Rtv7u/8/

I would like to rewrite it in jquery in the hope that it will work nice in IE and will be shorter and clearer.

I don’t ask you to “translate” the full code, but give instructions or reference how to do that. (Or example about the beginning)

Thanks.

var table = document.createElement('table');
    table.width  = 625;
    table.className="feltoltesek_tabla_szegely";
    var tr1 = document.createElement('tr');
        var td1 = document.createElement('td');
        td1.width = 20; 
        td1.align="center";
        td1.height = 32;
        td1.rowSpan=3;
            var chb = document.createElement('input');
            chb.type="checkbox";
        var td2 = document.createElement('td');
        td2.rowSpan = 3;
        td2.width = 20; 
        td2.align="center";
            var kuka = document.createElement('div');
            kuka.className = "spr_kuka";
        var td3 = document.createElement('td');
        td3.rowSpan = 3;
        td3.width =  20; 
        td3.align="center";
            var dupl = document.createElement('div');
            dupl.className = "spr_dupl";
        var td4 = document.createElement('td');
        td4.rowSpan = 3;
        td4.width = 135;
        td4.align = "center";
        $('<img/>').attr('src',"http://jsfiddle.net/img/logo.png")
            .css({display:'none',width:76})
            .appendTo(td4)
            .load(function(){
            $(this).fadeIn(1000); });
        var td5 = document.createElement('td');
            td5.innerHTML = "file.name";
        var td6 = document.createElement('td');
        td6.width = 100;
            var meret= document.createElement('select');
            meret.className = "sel_sm";
        var td7 = document.createElement('td');
        td7.width = 80;
            var db = document.createElement('input');
            db.className = "box_sm";
            db.size=3;
            db.type="text";
            var db_span = document.createElement('span');
            db_span.innerHTML = "&nbsp;*";
    var tr2 = document.createElement('tr');
        tr2.height = 21;
        var tdu1 = document.createElement('td');
        var tdu2 = document.createElement('td');
        var tdu3 = document.createElement('td');
        var tdu4 = document.createElement('td');
        var tdu5 = document.createElement('td');
        var tdu6 = document.createElement('td');
        var tdu7 = document.createElement('td');
        var tdu8 = document.createElement('td');            
        var keparany = document.createElement('td');
        keparany.colSpan=3;
        keparany.innerHTML = "row2";
        var felbontas = document.createElement('td');
        felbontas.colSpan=3;
        felbontas.innerHTML = "row3";
    var tr3 = document.createElement('tr');
        tr3.height = 21;
    td1.appendChild(chb);
    td2.appendChild(kuka);
    td3.appendChild(dupl);
    td6.appendChild(meret);
    td7.appendChild(db);        
    td7.appendChild(db_span);    
    tr1.appendChild(td1);
    tr1.appendChild(td2);
    tr1.appendChild(td3);
    tr1.appendChild(td4);
    tr1.appendChild(td5);
    tr1.appendChild(td6);
    tr1.appendChild(td7);
    tr2.appendChild(keparany);
    tr3.appendChild(felbontas);
    table.appendChild(tr1);
    table.appendChild(tr2);
    table.appendChild(tr3);
    var e2 = document.getElementById('id');
    e2.appendChild(table);
  • 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-26T19:54:24+00:00Added an answer on May 26, 2026 at 7:54 pm

    With jquery, you can create elements using their HTML code. For example :

    jQuery("<p>hello <span style='color:green'>world !</span>");
    

    So, you can simply do that :

    http://jsfiddle.net/Rtv7u/9/

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

Sidebar

Related Questions

I have this long and complex source code that uses a RNG with a
I have found this code for reverse geocoding: var point = new GLatLng (lat[1],long[1]);
I have seen this for a long time, and finally decided to put the
Well basically I have this script that takes a long time to execute and
I have this case <WrapPanel> <CheckBox>Really long name</CheckBox> <CheckBox>Short</CheckBox> <CheckBox>Longer again</CheckBox> <CheckBox>Foo</CheckBox> <Slider MinWidth=200
This is a long shot, I know... Let's say I have a collection List<MyClass>
I have been asking myself this question for a long time now. Thought of
Hopefully this is simple: I have a relatively long list where each list item
I have very long integer sequences that look like this (arbitrary length!): 0000000001110002220033333 Now
I have been trying to figure this out for way to long tonight. I

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.