0

I am trying to add an existing capability to another part of our system. It was originally written only for one part of the system, but we want it available in another one.

So I basically copied the code (which was a huge javascript function) and pasted it into the new part of the system. Well, everything works great except for one html table that is being displayed as hidden. Everything around it is visible. But for some reason this one table is not displayed. I am guessing that because I copied it into another area, that it is inheriting some type of hidden attribute, but I have looked around everywhere and don't see anything that would be making it hidden. I am sure if I knew my own environment I would have a better idea of where to look, but this environment is so complex and i'm not used to web development and javascript and CSS. Is there someway to quickly fix this by overriding any attributes that the table might have inherited and just force it to be visible? that would be the easiest fix if it were possible.

Anyway, if you can think of anything, please advise me. Basically I have a mystery hidden table that is being hidden because of something higher up the chain (that it must have inherited) and I am not knowledgeable to figure out where it is happening.

NightShadeQueen
  • 3,284
  • 3
  • 24
  • 37
package81
  • 17
  • 1
  • 3
  • 1
    You might benefit from reading http://stackoverflow.com/help/how-to-ask, you should include relevant code samples and show what you have tried/found out already – talegna Jul 20 '15 at 17:30
  • I think it would be most beneficial for you and your organization/team if you understood the complex system better. Copying and pasting code from one part of the system to another is just making the system more complex, and it's a code smell. Then when you have a specific programming question to ask, you can ask it on SO. – Samuel Jul 20 '15 at 17:32

2 Answers2

3

The Best and most probably the easiest way to debug it(without getting through the lines of code) is to open the webpage in chrome, right click on the page and go for inspect element. There you can see the HTML code in the bottom panel. Find the HTML code for the table and hover over it, then you can find the position of your hidden table. Then check if the table has some css class attached with it. If yes click on the css class in the HTML code, then you can see the css table attributes in the bottom right panel. Change the value of position or any other tag to find any visible changes. GOOD LUCK!!

kingshuk basak
  • 423
  • 2
  • 8
0

If you know the classname of the table and have jquery just do

$(".ELEMENTNAME").show();

probably the easiest way.. If it's an ID for that particular table you'll have to use

$("#ELEMENTNAME").show();
Bryan Mudge
  • 432
  • 4
  • 12