Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Code that will adjust size of html pages based on user's screen width

Avatar of John Carney
John CarneyFlag for United States of America asked on
Adobe Dreamweaver
4 Comments1 Solution359 ViewsLast Modified:
I need some code that will detect the width of the user's screen resolution (primarily either 1024 or 1280) and adjust the size of my index.htm accordingly.

My index.htm contains a single Flash movie (Flash 7.2), niminally sized at 720x610, which fits more than easily at 1280, but requires scrolling at 1024. I need some code that will reduce the image enough to just fit without scrolling.

If you could insert the code properly in my existing code, that would be even better. (See existing code below)

Thanks!

John

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>NJCAL homepage</title>
<style type="text/css">
<!--
body {
      background-color: #330099;
}
.style1 {
      font-size: 36px;
      font-weight: bold;
      color: #FFFFFF;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

</script>
</head>

<body>
<div align="center">
  <p>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="720" height="610">
      <param name="movie" value="NJCALL5.swf">
      <param name=quality value=high>
      <embed src="NJCALL5.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="720" height="610"></embed>
    </object>
  </p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;  </p>
</div>
</body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of matrixnz
matrixnz

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers