Need help VBA macro to handle webpage dialog
I have macro that selects the element from drop down box and then click on APPLY button. As a resultof click I could see a web page dialog box pup-up which PRINT, DOWNLOAD to SYSTEM, CANCEL buttons.
Since this is a model window I am unable to FINDWINDOW, unable to sendkeys in 2010 win7. Please can you help me to trigger the event exportGrid as per the below script got from F12 IE Developer tools.
Grid.prototype.printOrExport = function ()
/*
Show dialog to give user choice of either printing or exporting the grid.
*/
{
//var numRows = RowVisible(this.gridData);
//var numCols = ColVisible(this.gridData);
// alert('rows: ' + numRows + ' cols:' + numCols);
var numRows = this.rows.length;
var numCols = this.cols.length;
var that = this;
var dialogArgs = {numPages: '?', numRows: numRows, numColumns: numCols, opener: window};
doThisAction(
{
action: 'PrintExportDialog.do', forward: 'show',
modal: { width: 600, height: 250, args: dialogArgs,
handler: function (choice)
{
if (!choice || choice == 'cancel') return;
if (choice == "print")
that.print();
else if (choice == "exportGrid")
{
that.exportGrid();
}
}}
});
}
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago