Content all blank in IE6, IE7

Reference website: Untitled Document

The above webpage contained simply javescript of random images in full screen & menu made by Sothink DHTML Menu.

In Chrome & Firefox the content display perfectly with no issue.

However, it’s all blank in IE6 & IE7. I am not sure in IE8 & IE9 as I don’t have them.

Would like to have advice by experienced designers here.

Thanks for any help.

The HTMKL code are as follow:

Quoted

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" language="JavaScript1.2" src="stmenu.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body <a href="http://www.dhtml-menu-builder.com"  style="display:none;visibility:hidden;">Drop Down Menu</a>
<script type="text/javascript" src="pure/menu.js"></script>{
	margin-left: 0px;
	margin-top: 0px;
}
body{
margin: 0;
padding: 0;
}
</style>
</head>

<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">

<script type="text/javascript" language="JavaScript1.2">
<!--
stm_bm(["menu629e",660,"","blank.gif",1,"20","20",0,0,250,0,1000,1,0,0,"","",0,0,1,2,"default","hand",""],this);
stm_bp("p0",[1,4,0,0,2,3,0,7,100,"",-2,"",-2,50,0,0,"#999999","transparent","",3,0,0,"#000000"]);
stm_ai("p0i0",[0,"Home","","",-1,-1,0,"http://net-ready.net/pure/index.php","_self","","","","",0,0,0,"","",0,0,0,0,1,"#000000",1,"#B5BED6",1,"","",3,3,0,0,"#FFFFF7","#000000","#000000","#FF0000","12pt Verdana","12pt Verdana",0,0]);
stm_aix("p0i1","p0i0",[0,"News","","",-1,-1,0,""]);
stm_aix("p0i2","p0i0",[0,"Products","","",-1,-1,0,"","_self","","","","",0,0,0,"arrow_r.gif","arrow_r.gif",7,7]);
stm_bpx("p1","p0",[1,4,10,0,2,3,0,0]);
stm_aix("p1i0","p0i1",[0,"In the mood of love"]);
stm_aix("p1i1","p0i1",[0,"Double Layer Glass Container"]);
stm_ep();
stm_ep();
stm_em();
//-->
</script>





 <script language="JavaScript" type="text/javascript">
// This script was supplied by Dave Joosten
// For support and info go read the Tutorial at [Random Images by using simple to modify JavaScript - AJAX and JavaScript - Tutorials - DMXzone.COM](http://www.dmxzone.com/ShowDetail.asp?NewsId=5417|)
var id = 3; // Total number of images
var ranimage = new Array(id); // Array to hold the filenames

ranimage[0] = "japgirl.jpg";
ranimage[1] = "japgirl2.jpg";
ranimage[2] = "japgirl3.jpg";

function choseRandom(range) {
if (Math.random)
return Math.round(Math.random() * (range-1));
else {
var now = new Date();
return (now.getTime() / 1000) % range;
}
}
// 
var choice = choseRandom(id);
</script>



<script language="JavaScript">document.writeln('<td' + '><img src="' + ranimage[choice] + '" height="auto" width="100%" hspace="0" vspace="0" border="0" margin: 0; ><' + '/td>');</script>
 

</table>

</body>
</html>

Unquoted

This is likely a Javascript issue, though it surprises me any browser actually does something with that.

Anyway, I can certainly say your <style> setup is totally invalid (not that that’s known for stopping IE in its tracks but it can).


<style type="text/css">
body <a href="http://www.dhtml-menu-builder.com" style="display:none;visibility:hidden;">Drop Down Menu</a>
<script type="text/javascript" src="pure/menu.js"></script>{
margin-left: 0px;
margin-top: 0px;
}
body{
margin: 0;
padding: 0;
}
</style>

Don’t put script tags or HTML tags in your styles. They don’t belong there and cannot be parsed correctly. Firefox and Chrome are just ignoring it and guessing what you meant.

So this whole section makes zero sense:
body <a href=“http://www.dhtml-menu-builder.com” style=“display:none;visibility:hidden;”>Drop Down Menu</a>
<script type=“text/javascript” src=“pure/menu.js”></script>{

I will rant a bit about Javascripted drop-down menus: they are pure evil if they are pure Javascript, and display: none means content is not available to screen reader users (well, depending on the action required to display the dropdown menu… but even if you use onClick, people will be expecting to follow the link, not go nowhere but get a dropdown).

A menu is content, and content gets marked up with HTML.
How it looks is style, and style is done with CSS.
How it acts is sometimes the realm of Javascript, but since in this case it makes the entire menu totally unusable for any user agents blocking scripts or can’t run scripts, Javascript is not a good idea here.

But anyway, if after fixing the <style> tags you still have issues with the menu, the problem is likely in the Javascript, which means you’ll get better answers in the Javascript forum.

Good luck.

Thanks Stomme.

Have tried to delete those line suggested by you but no luck there.

I posted the thread to the javascript section and hope some luck there.

Thanks again

Lawrence

14 validation errors on a page with only 71 lines of code? NOT a good sign.

That said, no clue what all that javascript is for (I smell javascript for nothing here) but pretty sure whatever it is that’s supposed to do, it’s not doing it.

That it’s 1990’s javascript with the use of the ‘language’ attribute and tranny doctype probably indicates whatever it is you are trying to do, Javascript is likely NOT the answer.

But the DECADE out of date markup is proof enough of that. Pulling up the “generated source” I get a giant train-wreck of “tables for nothing”

… and I don’t care how much you like the japanese guy trying to pass for a girl, a 586k background image is unacceptable on a website; ever notice NOBODY builds a site that way? there’s a reason for this – that image ALONE is six to seven times what I consider the ideal target size for a site, and four times the upper limit I’d allow on a contentless template.

From what I’m seeing, you’ve got 2k of markup and 34k of javascript doing 900 bytes of markup, 2k of CSS and NO javascript’s job.

LITERALLY, there’s NOTHING there you should be wasting javascript on, much less 34k worth of it.

Thanks for the opinion, deathshadow60.

The random image javascript was just got from the web as a result of script searching. I don’t know it’s stuff of old days and does fit standard of nowaday’s web standard.

Do you have any better random image script recommendation pls?

Regarding the jap girl and mega size graphic is not intented. What’s in there is just a demo/trial run of the script.

Thanks again

Continued http://www.sitepoint.com/forums/javascript-15/random-images-javascript-not-working-ie6-ie7-750081.html#post4855739