veysel Posted November 26, 2019 Share Posted November 26, 2019 (edited) 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 November 26, 2019 by veysel Quote Link to comment https://forums.phpfreaks.com/topic/309583-progress-bar-not-updating/ Share on other sites More sharing options...
NotSunfighter Posted November 26, 2019 Share Posted November 26, 2019 For starters change the <? to <?php (4 places) and see if things clear up. If not come back and somebody is sure t help. Quote Link to comment https://forums.phpfreaks.com/topic/309583-progress-bar-not-updating/#findComment-1571915 Share on other sites More sharing options...
NotSunfighter Posted November 26, 2019 Share Posted November 26, 2019 In your rotdeviation() function: This line var ct = $("#devvin1").data("term") || 0; has amisspelling too many v's. Quote Link to comment https://forums.phpfreaks.com/topic/309583-progress-bar-not-updating/#findComment-1571916 Share on other sites More sharing options...
veysel Posted November 26, 2019 Author Share Posted November 26, 2019 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 Quote Link to comment https://forums.phpfreaks.com/topic/309583-progress-bar-not-updating/#findComment-1571919 Share on other sites More sharing options...
veysel Posted November 27, 2019 Author Share Posted November 27, 2019 (edited) Hello NotSunfighter, i tried your solution but it did not work but thank you for help Edited November 27, 2019 by veysel Quote Link to comment https://forums.phpfreaks.com/topic/309583-progress-bar-not-updating/#findComment-1571929 Share on other sites More sharing options...
NotSunfighter Posted November 27, 2019 Share Posted November 27, 2019 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? Quote Link to comment https://forums.phpfreaks.com/topic/309583-progress-bar-not-updating/#findComment-1571931 Share on other sites More sharing options...
veysel Posted November 28, 2019 Author Share Posted November 28, 2019 Hello i ask this question another web page and i solved with help. the web page url : https://www.webdeveloper.com/d/386860-progress-bar-not-working/17 i hope it is not illegal(sharing another web page) Quote Link to comment https://forums.phpfreaks.com/topic/309583-progress-bar-not-updating/#findComment-1571957 Share on other sites More sharing options...
veysel Posted November 28, 2019 Author Share Posted November 28, 2019 problem was solved thank you for your help NotSunfighter Quote Link to comment https://forums.phpfreaks.com/topic/309583-progress-bar-not-updating/#findComment-1571958 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.