Some problem with OBJECT and table

D

Dif

Hi all,
I'm writing a personal web site and since my ISP is not offering me
the possibility to have server-side scripting (I'm using the classical
free web space available with the connection), I'm using a combination
of TABLE and OBJECT to manage the redundant parts of my pages (I don't
know it is the best practice); unfortunately I'm having some problem
and I can't find a solution.

You can see the following page as example of my problems:
http://marcodifresco.interfree.it/test/hptable.html

The problems are the following:
- the OBJECT code seems to require more space than necessary otherwise
it shows up scroll bars (for example for the 728x90 leader board I
have on top I have to set width="770" and height="130"), but in this
way I'm getting too much blank space between elements; you can see the
scroll bars (the width and height match the intended value) on the
advertisement skyscraper on the left and the excessive white space
(the width and height are higher than intended) below the leader board
on top (apply also to the search box);
- if I use OBJECT to render a web page inside a cell (as I said I'm
using a TABLE to layout my web site) and I click a link of that page,
the linked page will be rendered inside the cell instead of loading
full screen; you can see the effect either on the short menu above the
skyscraper (the one that says "Home Page - Send this page - Your
feedback about this page") or with the link on the copyright notice at
the bottom of the page;
- while in Firefox the page looks OK (except for the excessive white
space mentioned in point 1), in IE7 the sections rendered with OBJECT
show a vertical scroll bar (that is grayed out since the section is
fully rendered).

Do you have any idea how I can solve these problems?

Thank in advance.
 
D

Dif

First, put in a doctype and read why this is important. Put in
the 4.01 Strict one if unsure.

Hi dorayme,
thank for the reply.

I doctype declaration and I took the opportunity to do a HTML
validation (I used the W3C one), but it found just a couple of
marginal errors (it complained about two </p> missing the opening even
if they were two line above).

I corrected the anomalies suggested by the validation (now W3C reports
"This Page Is Valid HTML 4.01 Transitional!"), but unfortunately the
problems persist. :-(

Any idea?
 
D

Dif

First, put in a doctype and read why this is important. Put in
the 4.01 Strict one if unsure.

Hi dorayme,
thank for the reply.

I doctype declaration and I took the opportunity to do a HTML
validation (I used the W3C one), but it found just a couple of
marginal errors (it complained about two </p> missing the opening even
if they were two line above).

I corrected the anomalies suggested by the validation (now W3C reports
"This Page Is Valid HTML 4.01 Transitional!"), but unfortunately the
problems persist. :-(

Any idea?
 
J

Jonathan N. Little

Dif said:
Hi all,
I'm writing a personal web site and since my ISP is not offering me
the possibility to have server-side scripting (I'm using the classical
free web space available with the connection), I'm using a combination
of TABLE and OBJECT to manage the redundant parts of my pages (I don't
know it is the best practice); unfortunately I'm having some problem
and I can't find a solution.

You can see the following page as example of my problems:
http://marcodifresco.interfree.it/test/hptable.html


Your server is Apache, good possibility you have PHP available. To test
in a text editor insert following:
<html>
<head>
<title>PHP Info</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>

save file as phpinfo.php

upload to server and check with browser

http://marcodifresco.interfree.it/test/phpinfo.php

If you have PHP then you will see tables of PHP settings. If you have
PHP then dump the hack with OBJECTs and use PHP includes
The problems are the following:
- the OBJECT code seems to require more space than necessary otherwise
<snip>

MSIE will always put scrollbars on the object it seems. Really kludgy
way to do includes.
 
D

Dif

[CUT]
Your server is Apache, good possibility you have PHP available. To test
in a text editor insert following:
<html>
<head>
<title>PHP Info</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>

save file as phpinfo.php

upload to server and check with browser

http://marcodifresco.interfree.it/test/phpinfo.php

If you have PHP then you will see tables of PHP settings. If you have
PHP then dump the hack with OBJECTs and use PHP includes

Tested, but as I suspected PHP is not supported (usually, here in
Italy at least, when ISPs bundle free web space with the connection,
it is just free space - ergo no sever-side scripting, but just the
plain HTML and eventually client-side scripting [like Javascripts]). :-
(
MSIE will always put scrollbars on the object it seems. Really kludgy
way to do includes.

Uhm, too bad. I could have lived with the extra space (due to the
first problem), but those scroll bars are very ugly. :-(

Anyway, thank for the help. :)

BTW does anyone have any consideration for the second problem (pages
opened by links of the page rendered with OBJECT nested on a cell are
rendered inside the cell instead of loading a full new page)?
 
J

Jonathan N. Little

Dif said:
Tested, but as I suspected PHP is not supported (usually, here in
Italy at least, when ISPs bundle free web space with the connection,
it is just free space - ergo no sever-side scripting, but just the
plain HTML and eventually client-side scripting [like Javascripts]). :-
(

I would say spend a few bucks and get hosting an make you site look
good. Many small scale packages with fewer bells and whistles that you
would not need but include PHP for a about $50 a year or less. Yeah you
don't have to get hosting in Italy, anywhere in the world where you can
get the best value will do... I don't use them but for example
GoDaddy.com has some economy plans < $4 depending on how much you pay in
advance...
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Mon, 13 Aug 2007 19:28:10 GMT
Dif scribed:
Tested, but as I suspected PHP is not supported (usually, here in
Italy at least, when ISPs bundle free web space with the connection,
it is just free space - ergo no sever-side scripting, but just the
plain HTML and eventually client-side scripting [like Javascripts]). :-

Italy? What kind of name is "Dif" for a Pizano? Different, that's for
sure...
 
D

Dif

Dif said:
Tested, but as I suspected PHP is not supported (usually, here in
Italy at least, when ISPs bundle free web space with the connection,
it is just free space - ergo no sever-side scripting, but just the
plain HTML and eventually client-side scripting [like Javascripts]). :-
(

I would say spend a few bucks and get hosting an make you site look
good. Many small scale packages with fewer bells and whistles that you
would not need but include PHP for a about $50 a year or less. Yeah you
don't have to get hosting in Italy, anywhere in the world where you can
get the best value will do... I don't use them but for example
GoDaddy.com has some economy plans < $4 depending on how much you pay in
advance...

I'll take that in consideration. Actually I should first build some
basic content to the site since so far the only real content I wrote
is a mini-guide to a 4 years old game (Star Wars: Knights of the Old
Republic ) and nothing more yet (and actually I still don't know how
much far I will go on building up my site). :)

Anyway I found a solution to the IE problem (the third one on the
original post):
- First I had to put scroll=no on the <BODY> tag on the embedded page
(so it become <BODY scroll=no>); this resolve the scroll bar issue;
- Second, I had to put the following code on the main page (the one
that call all the OBJECTS) to resolve the border issue (I didn't
reported it since I thought it was part of the scroll bar one):

<!-- Fix for IE border Begin -->
<script type="text/javascript">
function fixObjectImages ()
{
var objs = document.getElementsByTagName ('OBJECT');
for (n = 0; n < objs.length; n++)
{
var obj = objs [n];
if ((obj != null && obj.type != null)
&& ((obj.type == "text/html") || (obj.type == "image/gif")))
{
fixObject (obj);
}
}
}

function fixObject (obj)
{
obj.body.style.margin = '0';
obj.body.style.border = 'none';
obj.body.style.overflow = 'hidden';
}
// To do: Only do this for IE !
window.onload = fixObjectImages;
</script>
<!-- Fix for IE border End -->


Speaking of the other two problems, the second one is the one I'll
investigate further since it is annoying (any idea?); I can live with
the first one until I'll create enough content to migrate to a paid
server.

Thank again for the help. :)
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top