Help - Search - Members - Calendar
Full Version: Object required error...
HTMLHelp Forums > Programming > Server-side Scripting
npessoa
Hi, I'm getting an error with a template I downloaded. The page is Flash but it's encased in an index.html file, which I've kept structurally the same as the original template file. The error I'm getting is: Line 5, Char 4, Object Required. The link is: http://www.seimone.com/npessoa and here are the opening few lines:

--------------------------------
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r" />
<title>test</title>

<script language="javascript" type="text/javascript">
<!--Hide script from old browsers
function newWindow(newContent)
{
winContent = window.open(newContent, 'nextWin', 'right=0, top=20,width=350,height=350,
toolbar=yes,scrollbars=yes, resizable=yes')
}
//Stop hiding script from old browsers -->
</SCRIPT>
</head>

<script src="active.js" type="text/javascript"></script>
<script src="resize.js" type="text/javascript"></script>
<script language="JavaScript" src="active.js" type="text/javascript"></script>

<body bgcolor="#ffffff" background="bbg.jpg" style="background-position:left; background-repeat:repeat-y"
marginheight="0" marginwidth="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td>
------------------------------------------

The js files in bold, active.js and resize.js, are exactly where they were in the original template - I found it strange that they were below the <head>, but I left them there just in case. The other js file is something I added on my own - it specifies the size of a pop-up window with audio samples in a different section of the site.

I don't get why there's an error for Line 5, though, unless it's referring to something in the original .js files and not index.html itself. Is this a DOCTYPE issue? I have tried deleting the 3rd JS script (in case of a conflict), moving all scripts above the </head> tag, etc., and so far nothing has worked! Advice greatly appreciated!!
pandy
The line in resize.js that causes the error is this.
CODE
document.getElementById('main').style.height='700';

There is no id 'main' in the HTML.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.