Jump to content

 

Photo
- - - - -

javascript loding time


  • Please log in to reply
5 replies to this topic

#1 pathiban

pathiban

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 26 March 2012 - 02:34 PM

Hi to all,

I have created 3 rows and 2 columns.Each cell contains one visifire chart.But loading time is getting late.
i think that having problem visifire.js.Because visifire returning xml data in code behind is very fast.Can i load visifire chart priority order or is there any way to reduce loading time.

And when i made some changes in outside JavaScript is it affecting visifire chart.Please anyone tel the answer for this?

#2 sharmila

sharmila

    Advanced Member

  • Administrators
  • PipPipPip
  • 697 posts
  • Gender:Female

Posted 27 March 2012 - 05:32 AM

Hi Pathiban,

Try loading chart one after the other inside a timer so that charts are loaded sequentially.

Regards,
Sharmila

#3 pathiban

pathiban

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 27 March 2012 - 05:08 PM

Hi Sharmila thanks for the response.I have tried with timer control ,but charts are not loading.is it right way? or should i change any other way..if so please suggest me.I posted my code here


System.Timers.Timer function_call = new System.Timers.Timer(6000);
function_call.Enabled = true;
function_call.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
function_call.Enabled = false;
//calling my visifire function here
}


thank you.

#4 sharmila

sharmila

    Advanced Member

  • Administrators
  • PipPipPip
  • 697 posts
  • Gender:Female

Posted 28 March 2012 - 06:23 AM

Hi pathiban,

Can you please tell me whether you have started the timer? Also why are you setting function_call.Enabled to false(Stopping the timer)inside timer_Elapsed event?

Regards,
Sharmila

#5 pathiban

pathiban

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 30 March 2012 - 12:20 PM

Hi Sharmila,

Actually i am using jquery slide show to show the visifire chart.In total 6 charts i have planned to show first chart fastly .And another 5 charts later in timer control.Outside the timer function executing visifire but inside the timer function visifire is not loding.And i have used update panel too.Without timer everything working fine.


System.Timers.Timer function_call = new System.Timers.Timer(6000);
protected void function1()
{
first_visifire_chart();

function_call.Start();
function_call.Enabled = true;
function_call.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
}
private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
function_call.Enabled = false;
second_visifire_chart();.......sixth_visifire_chart();

}

thank you.

#6 vivek

vivek

    Advanced Member

  • Team Visifire
  • PipPipPip
  • 3,597 posts
  • Gender:Male
  • Location:Bangalore

Posted 02 April 2012 - 07:51 AM

pathiban,

Try putting the timer inside updatepanel and see. This way the timer will trigger a postback everytime the Elapsed event fires.

Regards,
Vivek
Team Visifire





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users