Log in

View Full Version : IE and <object> problem



chumpster
08-14-2008, 11:48 PM
I can get IE to display my inserted objects as below. After some messing around I might add.

However when I click a link in the object I am given an error and told about script errors.

When I do the same thing in either Opera or Firefox under Windows or Linux I get no problems at all.

Can you help as this is driving me nuts now.

The main page calls the object as below - like I said it displays perfect.
<p><object type="text/html" height="500" width="210" data="latest.html"></object></p>

latest.html looks like this.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="toptips.css" />
</HEAD>
<body style="border:0;overflow:auto">

<a href="link1.html">New training class</a>

<p>As of 30th July we are offering training classes.</p>

<a href="contact.html" target="_top">Can you help?</a>

<p>Are you struggling to find training classes in your area?</p>

<a href="http://www.some.site/" target="_blank">Some.Site</a>

<p>For all the pampering your dog needs, why not treat them to a trip to the salon.</p><br>

<p align="center"><img src="images/logo.jpg" title="Logo"/></p>


</BODY>
</HTML>

chumpster
08-15-2008, 05:56 PM
c'mon people

64 views and no-one has an idea whats wrong?!!!

Can anyone suggest then how I can load a basic html page inside another thus giving me a simple menu?

boogyman
08-15-2008, 06:30 PM
loading 1 html page inside of another without a server side language is most popularly done through the use of frames... if you do not want a website done entirely in frames, you could use and inline frame <iframe>, however the best recommendation I have is to use some type of server-side language like (php/asp), which right now are the most popular and relatively easy to learn... and do an "include" statement that would actually parse the content of the extra page right into the existing page.

If you do not have access to a server-side language or just do not want to use one, do a search on google for html frames or html iframe and just look through the tutorials

chumpster
08-15-2008, 06:44 PM
I have tried a php include but the tutorial I looked through didnt work on my system.

If anyone can recommend a simple php code that will work I will be more than grateful.

boogyman
08-15-2008, 06:47 PM
<?php
include_once('/path/to/script.extension');
?>


the file that is using this script must now include the .php extension, meaning you cannot use a php command on a .html file

chumpster
08-15-2008, 07:22 PM
Sorted - almost.

It loads a file now and the links work correctly - something has just changed the colours though. I can sort that with a bit of tweaking.

Thank you