Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

images slow to load

Status
Not open for further replies.

ideasworking

Programmer
Dec 2, 2001
120
CA
Hello,

I'm trying to tailor my web pages to suit end user screen size. Now my pages are loading like I'm using dialup. I'm new to javascript so maybe I've done something wrong.

Anyone care to review my code?

TIA,
Lou

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<title>Javascript test</title>
<meta name="robots" CONTENT="all">
<meta name="content-language" CONTENT="en-US"> 
<SCRIPT TYPE="text/javascript">
if (screen.width <= '800'){document.write( "<link rel='stylesheet' type='text/css' href='800StyleSheet.css'>")}
if (screen.width > '800'){document.write( "<link rel='stylesheet' type='text/css' href='1024StyleSheet.css'>")}
</script>
</head>
<body>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="6" class="whitetext"><div align="center" class="MyTitle style7">
	<SCRIPT TYPE="text/javascript">
	if (screen.width <= '800'){document.write ("<img src='pictures/800banner.jpg' alt='Home' border='0'>")}
	if (screen.width > '800'){document.write ("<img src='pictures/1024banner.jpg' alt='Home' border='0'>")}
	</script>	
	</div></td>
  </tr>
  <tr><td height="10" colspan="6"></td></tr>
</table>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top