Looking for someone good with Java and jQuery

FirefighterKyle

I am Kyle!!
Sep 14, 2012
162
7
Okay well I have a problem with my Java, jQuery or my JSON connecting or something to a php/html code. If you need to look at another file or thing it would be easier to just get on tv and help me I am fine with that also.
My Client.php
PHP:
    <script type="text/javascript">
    var HealthLow = false;
    function LowHealth(Check)
    {
        if(HealthLow && Check)
            return;


        if(document.getElementById('MainProgHeart').style.width.slice(0,-1) < 15){
            HealthLow = true;
            $('#MainProgHeart')
                .animate({backgroundColor:'#AC2525',borderColor:'#AC2525'}, 300)
                .animate({backgroundColor:'#E63232',borderColor:'#E63232'}, 300, LowHealth);
        }else{
            HealthLow = false;
        }
    }
   
    var EnergyLow = false;
    function LowEnergy(Check)
    {
        if(EnergyLow && Check)
            return;


        if(document.getElementById('MainProgGball').style.width.slice(0,-1) < 15){
            EnergyLow = true;
            $('#MainProgGball')
                .animate({backgroundColor:'#719f12',borderColor:'#719f12'}, 300)
                .animate({backgroundColor:'#97D418',borderColor:'#97D418'}, 300, LowEnergy);
        }else{
            EnergyLow = false;
        }
    }
   
    var HungerLow = false;
    function LowHunger(Check)
    {
        if(HungerLow && Check)
            return;


        if(document.getElementById('MainProgBurger').style.width.slice(0,-1) < 15){
            HungerLow = true;
            $('#MainProgBurger')
                .animate({backgroundColor:'#816400',borderColor:'#816400'}, 300)
                .animate({backgroundColor:'#AD8600',borderColor:'#AD8600'}, 300, LowHunger);
        }else{
            HungerLow = false;
        }
    }

    function UpdateStats()
    {
        $.getJSON('stats', function(stats) {
            $('#MainProgHeart').animate({width: ((stats.curhealth/stats.health)*100)+'%'}, 200);
            $('#MainProgBurger').animate({width: (100-stats.hunger)+'%'}, 200);
            $('#MainProgGball').animate({width: (stats.energy)+'%'}, 200);
            $('_habboCountUpdateTarget').text('{online} Online');
           
            $('_HealthValue').text(stats.curhealth);
            $('_HealthMaxValue').text(stats.health);
            $('_HungerValue').text(stats.hunger);
            $('_EnergyValue').text(stats.energy);
           
            LowHealth(true);
            LowEnergy(true);
            LowHunger(true);

            setTimeout(UpdateStats, 500);
        });
    }
    UpdateStats();
    </script>
</head>

<body id="client" class="wide">
    <div id="client-topbar">
        <div class="logo"></div>

       
       
        <div class="space1">
</div>
<div class="heart">
</div>
<div class="space1">
</div>
<div class="MainBar">
<span id="MainProgHeart" style="width:100%"></span>
<span id="StatLabelHealth">
Health: <span id="HealthValue">?</span>/<span id="HealthMaxValue">?</span>
</span>


</div>

<div class="space1">
</div>
<div class="gball">
</div>
<div class="space1">
</div>
<div class="MainBar">
<span id="MainProgGball" style="width:100%"></span>
<span id="StatLabelEnergy">
Energy: <span id="EnergyValue">?</span>/100</span>
</span>
</div>

<div class="space1">
</div>
<div class="burger">
</div>
<div class="space1">
</div>
<div class="MainBar">
<span id="MainProgBurger" style="width:100%"></span>
<span id="StatLabelHunger">
Hunger: <span id="HungerValue">?</span>/100</span>
</span>
</div>

<div class="space1"></div><div class="space1"></div><div class="space1"></div><div class="space1"></div>
<div class="space1"></div><div class="space1"></div>


  <div class="habbocount">
<div id="habboCountUpdateTarget">
Loading...
</div>
</div>

<div class="space1"></div><div class="space1"></div><div class="space1"></div><div class="space1"></div>
<div class="space1"></div>
Here is a picture what is shows me but it should show my curent health my max health my energy and my hunger.
 

Users who are viewing this thread

Top