Using Server side Page Includes

L

Lauren

I am having difficulty including my top navigation to my website. I get an
error saying there is a problem with my onload.htm page on line 17 (object
expected). I am not sure how to fix it and I have tried to by adding a ">"
at the end of the body tag but this did not fix it.

The code came from the following website and was reformatted to suite my
menu option needs.
http://simplythebest.net/scripts/DHTML_scripts/dhtml_script_105.html

Here is the link to the top navigation page:
http://www.westar.com/drp_dwn/onload.htm

----------------------------------- onload.htm CODE:
------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>onload=</title>

<!-- Copyright © 2001 Garrett S. Smith (DHTML Kitchen)
http://dhtmlkitchen.com/ - Email: (e-mail address removed) -->
<!-- Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/ -->
<style type="text/css" title="stylesheet.css">
@import "menu_script/menu.css";
</style>
<script src="../../intranet.westar.com/Drp_dwn/menu_script/menubarAPI4.js"
type="text/javascript"></script>
<script src="../../intranet.westar.com/Drp_dwn/menu_script/init.js"
type="text/javascript"></script>
</head>

<body onload="init();monitor=document.getElementById('mon')">
</body>

</html>

-----------------------------------------------------------------------

The page uses 3 other pages called (menuabarAP14.js, init.js, and menu.css)
which you can view at the sample code website.

http://simplythebest.net/scripts/DHTML_scripts/dhtml_script_105.html


I have a deadline of Oct. 31st so any assistance would be greatly appreciated!

Thank you!
 
T

Thomas A. Rowe

You are not working with server-side include based on the code snip you provided, you are having
JavaScript issues where objects are being requested that don't exist.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
L

Lauren

Your right, what I meant by the server side include is that I'm trying to
include that page "onload.htm", but since there is an error on that page it
is not showing up. Do you know what I can do to correct the javascript error?

Thanks,

Lauren
 
T

Thomas A. Rowe

When using JavaScript in a include page, all links/URLs within the script must be absolute URLs.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
L

Lauren

The location on our server where we are storing the underconstruction site
can only be located by the following url
http://199.217.163.45/intranet/index.html with our proxy turned off on our
web browser. Once the site is complete we were going to point the domain to
the new site folder. Is the above not considered an absolute url?

Thanks,

Lauren
 
T

Thomas A. Rowe

Yes, that is a absolute URL.

You must make sure that any URL within your JavaScript code is also using absolute URLs

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
L

Lauren

I have verified that all URLs are absolute. The error is coming from the
onload.htm file, because I believe I have the onload tag pasted incorrectly
or it is missing something. (See 2nd to last line of code for the onload tag)
--------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>onload=</title>

<!-- Copyright © 2001 Garrett S. Smith (DHTML Kitchen)
http://dhtmlkitchen.com/ - Email: (e-mail address removed) -->
<!-- Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/ -->
<style type="text/css" title="stylesheet.css">
@import "menu_script/menu.css";
</style>
<script src="
http://199.217.163.45/intranet/Drp_dwn/menu_script/menubarAPI4.js"
type="text/javascript"></script>
<script src=" http://199.217.163.45/intranet/Drp_dwn/menu_script/init.js"
type="text/javascript"></script>
</head>

<body>
<body onload="init();monitor=document.getElementById('mon')">
</body>

</html>
---------------------------------------------------------------------------
 
T

Thomas A. Rowe

When you use the FP Include Page or Shared Border to include content in other pages, only the
content that is between the body tags is included in other pages. Content in the head section of the
page to be included is not included in other pages.

Example
<head>
.... content not included in other pages
</head>
<body>
....content to be included in other pages..
</body>

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
T

Thomas A. Rowe

Lauren,

Sorry, I do not use or work with JavaScript DHTML menu scripts, however see if following changes
will work after you have replaced www.yourdomainname.com with your actually domain:

<!-- Copyright © 2001 Garrett S. Smith (DHTML Kitchen) http://dhtmlkitchen.com/ - Email:
(e-mail address removed) -->
<!-- Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/ -->
<style type="text/css" title="http://www.yourdomainname.com/stylesheet.css">
@import "http://www.yourdomainname.com/menu_script/menu.css";
</style>
<script src="http://www.yourdomainname.com/menu_script/menubarAPI4.js"
type="text/javascript"></script>
<script src="http://www.yourdomainname.com/menu_script/init.js" type="text/javascript"></script>

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
T

Thomas A. Rowe

You are welcome.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top