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
6 years 10 weeks ago
6 years 48 weeks ago
7 years 8 weeks ago
7 years 11 weeks ago
7 years 12 weeks ago
7 years 17 weeks ago
7 years 25 weeks ago
7 years 26 weeks ago
7 years 26 weeks ago
7 years 26 weeks ago