ajex/javascript bug ??
ajex/javascript bug ??
Hi today i put the souce code from ajex/javascript game but i god i problem i cant see the images from the people or from the tree
this is the link to the game
http://brandonc.comule.com/game/
you can login with halls as username and for password also halls i dint mod the came intel now
this is the link to the game
http://brandonc.comule.com/game/
you can login with halls as username and for password also halls i dint mod the came intel now
Last edited by ier on Tue Dec 28, 2010 1:22 pm, edited 1 time in total.
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: ajex/javascript bug ??
i am not seeing the javascript include file.
Re: ajex/javascript bug ??
?? but the game runs good on my localhost
end the netmap.js is included
end the netmap.js is included
Re: ajex/javascript bug ??
No it's not. You need to include the script using a script tag like so:
Code: Select all
<script type="text/javascript" src="path/to/file.js"></script>
w00t
Re: ajex/javascript bug ??
somting like this
its alrady in the script
Code: Select all
<script type="text/javascript" src="netmap.js"></script>
Re: ajex/javascript bug ??
Well it's not showing up in the HTML, so it's not making the request to load that file...
This is the only script tag in the source:
Can you post your PHP here so I can better pinpoint the problem?
This is the only script tag in the source:
Code: Select all
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
w00t
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: ajex/javascript bug ??
yep i don't see it either.
Re: ajex/javascript bug ??
this is the code
this is from 000webhost
Code: Select all
<?php
include 'connect.php';
session_start();
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $title ?></title>
</head>
<link href="style.css" rel="stylesheet" type="text/css" />
<?php if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("Could not get user stats");
$playerinfo3=mysql_fetch_array($playerinfo2);
$netinfo="SELECT tag from a1 where name = '$playerinfo3[name]'";
$netinfo2=mysql_query($netinfo) or die("Could not get user stats");
$netinfo3=mysql_fetch_array($netinfo2);
}
else
{
print "Sorry, not logged in please <A href='index.php'>Login</a><br>";
exit;}
?>
<script language="javascript">
function init()
{
setInterval("travel();", 2000);
}
</script>
<script type="text/javascript" src="netmap.js"></script>
<div id="wrapper" align="center">
<table border="1">
<tr>
<td><div id="logo"><a href="http://brandonc.comule.com/game/main.php"><img src="images/logo.png" border="0"/></a></div></td>
<td><div id="buttons"><a href="http://brandonc.comule.com/game/logout.php"><img src="images/logout.png" border="0"/></a><img src="images/button.png" /><img src="images/button.png" /><br /><img src="images/button.png" /><img src="images/button.png" /><img src="images/button.png" /></div></td>
</tr>
</table>
<body onload="init()">
<style type="text/css">
.dynamicDiv {
width:22px;
height:22px;
font-size:11px;
font-family:verdana;
color:#000;
float:left;
}
</style>
<table border="1">
<tr>
<td><div id="panelarea" align="center">
<?php include 'leftpanel.php'; ?>
</td>
</div>
<td >
<div id="maparea" >
<script language="javascript">
function init()
{
setInterval("travel();", 4000);
}
var map = "<?php echo $playerinfo3['map'];?>";
var pid = "<?php echo $playerinfo3['name'];?>";
var playertag = "<?php echo $netinfo3['tag'];?>";
var wood = "<?php echo $playerinfo3['wood'];?>";
var lumbering = "<?php echo $playerinfo3['lumbering'];?>";
var actionwindow = new Array();
var awindowcount = 0;
for (i=0;i<=659;i++)
{
var divTag = document.createElement("div");
divTag.id = "div" + i;
//divTag.style.margin = "0px auto";
divTag.className ="dynamicDiv";
//divTag.innerHTML = "HE";
document.getElementById("maparea").appendChild(divTag);
}
document.getElementById("maparea").style.backgroundImage = "url(images/grassback1.png)";
travel(map);
</script>
</div>
</div>
</td>
<td><div id="rpanelarea" align="center"><?php include 'rightpanel.php';
echo "<br><br>";
echo "<u><b>-Action Window-</u></b><br>";
echo "<div id='actiontextbox'></div>";
?>
</tr>
</table>
</div>
</body>
</html>
</div>
Code: Select all
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: ajex/javascript bug ??
make sure you uploaded the right file. It looks different than what you posted. At least browser the source does. Try to reupload.
Re: ajex/javascript bug ??
okz i re uploaded the files but still god the problem