Solved

resize child window to match content

Posted on 2003-10-24
2
387 Views
Last Modified: 2008-03-06
I have a child window which contains dynamic tables, the width of the child is ok but sometimes the table length is greater than the window length and i would rather resize the window to show all the content than require the user to scroll to access the functions in the page.

Thanks
0
Comment
Question by:James Rodgers
2 Comments
 
LVL 25

Accepted Solution

by:
devic earned 100 total points
ID: 9615946
hi Jester_48, here is example, you can change numbers, to correct with your window:
==============================================================
<script>
function runit()
{
      var dynTable=document.getElementById("dynTable");
      window.resizeTo(dynTable.scrollWidth+100,dynTable.scrollHeight+200)
}
</script>
<table id=dynTable width=555 height=300 cellspacing=0 cellpadding=0 border=1>
      <td>&nbsp;</td>
</table>
<button onclick=runit()>runit</button>
0
 
LVL 25

Author Comment

by:James Rodgers
ID: 9616010
thanks...

works great!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now