basic code error im sure

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ldb
Forum Newbie
Posts: 2
Joined: Fri Feb 20, 2009 12:21 am

basic code error im sure

Post by ldb »

why isn't this working its loading a white page


<html>
<head>
<script language="javascript">

function lightup(imageobject, opacity){
if (navigator.appName.indexOf("Netscape")!=-1
&&parseInt(navigator.appVersion)>=5)
imageobject.style.MozOpacity=opacity/100
else if (navigator.appName.indexOf("Microsoft")!= -1
&&parseInt(navigator.appVersion)>=4)
imageobject.filters.alpha.opacity=opacity
}

</script>

<style>
<!--
.page{background-color:#000; color:#FFF; font-style:normal}

-->
</style>
</head>
<?
/* Include Files *********************/
session_start();
include("database.php");
include("login.php");
/*************************************/

?>
<title>Lanes Site</title>
<body class="page">
<?
if(!$logged_in){
displayLogin();
}
global $logged_in;
if($logged_in){
echo "<table width="440" height="440" cellspacing="20" border="999"><td bgcolor='#333333'><img src='flash.jpg' style='filter:alpha(opacity=100); -moz-opacity:1.0' onMouseover='lightup(this, 50)' onMouseout='lightup(this, 100)'></td>
<td><img src='html.jpg' style='filter:alpha(opacity=100); -moz-opacity:1.0' onMouseover='lightup(this, 50)' onMouseout='lightup(this, 100)' /></td>
<td><img src='photoshop.jpg' style='filter:alpha(opacity=100); -moz-opacity:1.0' onMouseover='lightup(this, 50)' onMouseout='lightup(this, 100)'></td>
<td><img src='php.jpg' style='filter:alpha(opacity=100); -moz-opacity:1.0' onMouseover='lightup(this, 50)' onMouseout='lightup(this, 100)'/></td></table>";
}
?>
Dinosoles
Forum Newbie
Posts: 8
Joined: Fri Feb 20, 2009 1:07 am

Re: basic code error im sure

Post by Dinosoles »

Hi,

Try changing your styles to...

<style type="text/css">
body { background: #000; color: #FFF; font-style: normal; }
</style>

Hope this helps.
ldb
Forum Newbie
Posts: 2
Joined: Fri Feb 20, 2009 12:21 am

Re: basic code error im sure

Post by ldb »

it still loads blank on my web site
Dinosoles
Forum Newbie
Posts: 8
Joined: Fri Feb 20, 2009 1:07 am

Re: basic code error im sure

Post by Dinosoles »

Hi,

Can you re-post your new code?
Post Reply