Jump to content
veysel

Progress bar not updating

Recommended Posts

Hello friends,

my devin1 div  working and updating when i change the .txt file content but devin8 div not updating without refreshing the page. Can anyone have an idea about that ?

 <? if ($fulldata['mainASSettingsLoc'][0] >= 1) { ?>
         <div class="panel_s">
         <div class="panel-heading" style="text-align: center;">Channel Vumeter 1</div>
         <div class="panel-body text-left" style="color:#000000;">
          LEFT
             <div class="progress">
                 <div id="devin1" class="progress-bar progress-bar-striped active bg-success" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
                    <span class="sr-only">45%</span>
                 </div>
             </div>
             <script>
                 devi1 = [<? foreach ($fulldata['left1'] as $v){ if ($v <> '-'){ echo '"'.$v.'",';} } ?>];
                 function rotdeviation() {
                     var ct = $("#devin1").data("term") || 0;
                     var valeur = devi1[ct];
                     
                   
                     $("#devin1").data("term", ct == devi1.length -1 ? 0 : ct + 1).css('width', valeur+'%').attr('aria-valuenow', valeur).fadeIn(0).delay(500).fadeOut(0, rotdeviation);
                 }$( document ).ready( rotdeviation );

             </script>
            RIGHT
            
             <div class="progress">
                 <div id="devin8" class="progress-bar progress-bar-striped active bg-success" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
                     <span class="sr-only">45%</span>
                 </div>
             </div>
             
             <script>
             
             
                 devi8 = [<? foreach ($fulldata['right1'] as $v){ if ($v <> '-'){ echo '"'.$v.'",';} } ?>];
                 
                 function rotdeviation8() {
                     var ct8 = $("#devin8").data("term") || 0;
                     var valeur8 = devi8[ct8];
                    
                     
                     $("#devin8").data("term", ct8 == devi8.length -1 ? 0 : ct8 + 1).css('width', valeur8+'%').attr('aria-valuenow', valeur8).fadeIn(0).delay(500).fadeOut(0, rotdeviation8);
                 }$( document ).ready( rotdeviation8 );

             </script>
             
         </div>
         </div>
   <? } ?>

 

Edited by veysel

Share this post


Link to post
Share on other sites

Hello NotSunfighter i am Veysel, you say amisspelling but i could not find it. And i will try this <? to <?php tomorrow because i am not in work right now, i hope it works. Thank you for your reply

Share this post


Link to post
Share on other sites

Hello NotSunfighter, i tried your solution but it did not work but thank you for help

Edited by veysel

Share this post


Link to post
Share on other sites

Not having the derived contents of devi1 and devi8 it's impossible go any farther. Can you run this and post the results in html/js only?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.