I have this code that changes frame's height depending on the content in it:

function AdjustFrame() {
var fr = document.frames("in");
fr.frameElement.style.width = fr.document.all.txt.offsetWidth+fr.document.all.txt.offsetLeft;
fr.frameElement.style.height = fr.document.all.txt.offsetHeight+fr.document.all.txt.offsetTop;
}

I need almost the same but with table.Is it possible?
Im not the one who made this code so I dont know how to change it to fit the table.....

    Well I know that its javascript but this is the best webprograming forum I have seen. I know that there is someone who knows javascript on this forum. So Im hoping they could answer me....

      You could use PHP with an if statement to determine whatever type of content you're dealing with and echo out the correct height parameter for your table... but you'll have to reload the page each time... If you want to do it on the fly without any reloads, use JS.

      LordShryku's link should help you.

        Write a Reply...