Alpha Video Training
Results 1 to 3 of 3

Thread: can not get onListReady() to fire

  1. #1
    Member
    Real Name
    Travis Irby
    Join Date
    Oct 2017
    Posts
    23

    Default can not get onListReady() to fire

    i have a list populated from a SQL2014 back end. the list populates correctly.
    when the list populated and ready i have a script call to populate some charts. nothing happens.
    i took the same calls and placed them in a onClick() in a button and the calls work.
    i place the code on a afterRefreshData and set the list to refresh every 10 seconds and it works, but have to wait for 10 Secs for charts to appear

    any ideas

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: can not get onListReady() to fire

    Use onListDraw instead. onListReady seems to be specifically for Lists with the localStorage features turned on... and then sometimes it fires twice. Or else onListReady is not functioning as expected.

    However, you need to give the Google Libraries a bit of time to get loaded. So put your chart code into a Javascript function... and call that function from onListDraw...

    Code:
    setTimeout(function(){
    	timeLineChart();
    },500);
    I'm not crazy about setTimeout() so I'm going to look for a better option.
    Last edited by Davidk; 11-27-2017 at 01:52 PM.

  3. #3
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: can not get onListReady() to fire

    There's a much better option thanks to Alpha. The UX Client-Side Events has an event named "afterGoogleVisualization" which runs after the library has been loaded.

    Put the call to your timeline chart function in there. There will always be some concern whether List is ready... but external libraries like googles will most likely take longer to load than your List... maybe.

    Since you're going after List data, you can always ensure the list data is available before creating the chart.

Similar Threads

  1. Server-side events won't fire after submit, or submit doesn't fire
    By maulem in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 01-13-2017, 02:12 PM
  2. else doesn't fire
    By madtowng in forum Application Server Version 11 - Web/Browser Applications
    Replies: 14
    Last Post: 09-25-2012, 10:42 PM
  3. When do events really fire????
    By enstorms in forum Alpha Five Version 8
    Replies: 20
    Last Post: 04-16-2008, 04:20 PM
  4. Autoexec script won't fire
    By Howard G. Cornett in forum Alpha Five Version 5
    Replies: 7
    Last Post: 09-11-2003, 01:02 PM
  5. autoexec won't fire
    By WillieLucas in forum Alpha Five Version 4
    Replies: 1
    Last Post: 05-25-2001, 11:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •