Function: showProgrammeList


showProgrammeList( String strCaption, String strText, String strOKButtonText, String strCancelButtonText, Array arrProgramme, [ Boolean modal ], [ String strHelpURL ] )

Summary

Display a list of programmes with an optional HTML text banner.


Parameters

ParameterDescription
String strCaption The caption of the popup window.
String strText The HTML text banner that appears at the top of the list.
String strOKButtonText Text used for the OK button.
String strCancelButtonText Text used for the Cancel button.
Array arrProgramme Array of programmes you wish to display.
Boolean modal [optional] Whether the window is modal, or modeless. Defaults to True.
String strHelpURL [optional] Allows you to specify the location of a Help web page so as to more fully describe the usage of the programme list.

When specified, a "Get more help" link will appear on the window.


Examples

The code below can be run at any time. It looks at "today" for markers with alerts and then displays a modeless popup window with the matching programmes.

//
// Figure out our time range...
var dtFrom = new Date();
var dtTo = new Date();
var nTime = dtFrom.getTime();
var nDays = 14;
nTime += 1000 * 60 * 60 * 24 * nDays;
dtTo.setTime( nTime );


var arr = new Array;

var listings = app.getListingsManager();
var arrProgs = listings.getProgrammeListForTimeRange( dtFrom, dtTo );
for( prog in arrProgs )
{
var prog = arrProgs[ prog ]
var arrMarker = prog.getMarkers();
for( var marker in arrMarker )
{
var mrk = arrMarker[ marker ];
if( !mrk.isProgrammeExcluded( prog ) && !mrk.hasAlertFired( prog) && mrk.hasAlert() )
{
arr.push( prog );
}
}
}

//
// If we have any programmes in our list then we display them.
if( arr.length )
{
var strOK = ""
var strCancel = "Close";
var strMessage = "<font size='4'><b>Todays Alerts</b></font><br>Below is a list of all programme on today that also have alerts."
showProgrammeList( "Todays Alerts", strMessage, strOK, strCancel, arr, false, "http://www.digiguide.com/help/todaysalert.shtml" );
}


See Also

  • Marker
  • Programme


    Requirements

    Build 1059