Moving output to divs
Moving output to divs
Okay, I'm querying my battle system, and I want to be able to output the results to a div that is at the bottom of the page. I know I could probably css this, but isn't there an easier way? Just too much to tell the css to go this far down and that far over for a div, when the output will be different, based upon what the player uses to attack with. So making a div at the bottom of the page and then having the ouput go into that div would be best for me I think. I may figure this out before anyone replies, but if you have an idea, please share lol. tankies
Re: Moving output to divs
Okay, I just made an output equals variable then echoed the variables in that output, and then in the div, I just outputted the ouput variable lmao. I think that's gonna work. YAY.
Re: Moving output to divs
Okay, to go along with this... I would like to display a progress bar and then some more text, and then a progress bar and them more text.
I tried using PAUSE feature in php but that starts the pause upon the page load and doesn't work properly.
So I need a work around if at all possible.
I tried using PAUSE feature in php but that starts the pause upon the page load and doesn't work properly.
So I need a work around if at all possible.
Re: Moving output to divs
Okay, I created a function to do the message, but how do I do more than one message? It echo's the loss of health, but I want it to wait like 5 seconds and then display the loss of strength or something else?
here is my code:
here is my code:
Code: Select all
<script type="text/javascript">
setInterval ( "bulletattack()", 5000 );
function bulletattack ( )
{
document.getElementById("lose_bullets").innerHTML = "<?php echo $outputList; ?>";
}
</script>
<div id="lose_bullets" style="height: 1.5em; font-size: 2em; color: red;">
</div>