I would like to ask how can i use my own values for progress bar which will show how much credit u spent until your preset maximum budget? input types are text to see if value comes in. it does. Progress bar has some progress but that is because i manually entered both values. http://postimg.org/image/fbjnrvvgn/
CODE:
<input type="text" id="max_budget" value="<?php include_once 'budget_calc.php'; echo $max_budget_echo; ?>">
<input type="text" id="calculated_budget" value="<?php include_once 'budget_calc.php'; echo $total ?>">
<script>
$(function() {
$( "#progressbar" ).progressbar({
max: 1000,
value: 100
});
});
</script>
<div id="progressbar"></div>
I would like to have max from user set max in database and value calculated from $total=$i-$o, like this:
<script>
$(function() {
$( "#progressbar" ).progressbar({
max: $('#max_budget').val(),
value: $('calculated_budget').val()
});
});
</script>
I have also tired this:
<script>
var max_budget=<?php include_once 'budget_calc.php'; echo $max_budget_echo; ?>
var calculated_budget=<?php include_once 'budget_calc.php'; echo $total; ?>
$(function() {
$( "#progressbar" ).progressbar({
max: max_budget,
value: calculated_budget
});
});
</script>
But nothig works :( How can i solve this problem? Thank you for your time (: