You need to sign in to do that
Don't have an account?
NeedHelp55
Progressbar on Visualforce Page
I want to show alert whenever progressbar reaches to the max value.
Here is my code---------
<script>
var width=0;
var timer;
$(document).ready(function(){
if(width<100){
timer=setInterval("CallMeInterval()", 2000);
}
});
function CallMeInterval()
{
$( "#progressbar" ).progressbar({
value: width+=10
});
}
</script>
<apex:form >
</apex:form>
<div id="progressbar"></div>
I have tried it through lots of way but not working perfectly.Please Help.
------i got my solution----------------------
<apex:page sidebar="flase">
<apex:includeScript value="{!URLFOR($Resource.jqueryStable, '/js/jquery-1.7.2.min.js')}" />
<apex:includeScript value="{!URLFOR($Resource.jqueryStable, '/js/jquery-ui-1.8.20.custom.min.js')}" />
<apex:stylesheet value="{!URLFOR($Resource.jqueryStable, '/css/cupertino/jquery-ui-1.8.20.custom.css')}"/>
<script>
var width=0;
var timer;
$(document).ready(function(){
if(width<100){
timer=setInterval("CallMeInterval()", 1000);
}
});
function CallMeInterval()
{
$( "#progressbar" ).progressbar({
value: width+=4
});
//alert(width);
if(width==100){
alert('Successfully Completed');
timer = window.clearInterval(timer);
}
}
</script>
<apex:form >
</apex:form>
<div id="progressbar" style="width:500px;border: 1px solid #4C3C1B;"></div>
</apex:page>
All Answers
------i got my solution----------------------
<apex:page sidebar="flase">
<apex:includeScript value="{!URLFOR($Resource.jqueryStable, '/js/jquery-1.7.2.min.js')}" />
<apex:includeScript value="{!URLFOR($Resource.jqueryStable, '/js/jquery-ui-1.8.20.custom.min.js')}" />
<apex:stylesheet value="{!URLFOR($Resource.jqueryStable, '/css/cupertino/jquery-ui-1.8.20.custom.css')}"/>
<script>
var width=0;
var timer;
$(document).ready(function(){
if(width<100){
timer=setInterval("CallMeInterval()", 1000);
}
});
function CallMeInterval()
{
$( "#progressbar" ).progressbar({
value: width+=4
});
//alert(width);
if(width==100){
alert('Successfully Completed');
timer = window.clearInterval(timer);
}
}
</script>
<apex:form >
</apex:form>
<div id="progressbar" style="width:500px;border: 1px solid #4C3C1B;"></div>
</apex:page>
i dont find any use with this example.
Regards
Lakshman