Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.23 / 5.00 3,881 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.93 / 5.00 4,634 ViewsNeed some help on why my code isn't working.
HTML
<div id="content">
<?PHP
include "content.txt" ;
?>
</div>
CSS
#content {
width: 50%;
height: 100%;
position: absolute;
left: 25%;
top: 400px;
z-index: 5;
} Sig created by HighWay
At 5/17/12 04:40 AM, Blounty wrote: Need some help on why my code isn't working.
HTML
<div id="content">
<?PHP
include "content.txt" ;
?>
</div>
CSS
#content {
width: 50%;
height: 100%;
position: absolute;
left: 25%;
top: 400px;
z-index: 5;
}
Try AJAXing it into the page. Get jQuery and link it in the page's head tag. using
<script src="jquery.js" type="text/javascript" />
Next, do a
<script type="text/javascript">$.ajax({url: 'content.txt',complete: function(jqXHR,textStatus) {$('#content').html(jqXHR.responseText);}});</script>
jQuery can be downloaded from jquery.com
No need for ajax for this. You can just read the file like and output it like this:
<?php
echo file_get_contents('content.txt');
?> The Internet is like a screwdriver. You can use it to take an engine apart and understand it, or you can see how far you can stick it in your ear until you hit resistance.