22-10-20 09:00 AM
An HTML page retrieves search results in a new page(dialogue) from a Javascript function "ShowDialog_NoReturnValue" with parameters to another ASPX page. I can not retrieve the elements from this page. I have injected the Javascript code below, but it does not retrieve the data from the new page(dialogue). I have also detached and attached from the page. Any other suggestions?
function getScope(){
if (document.getElementById('JSOutput') == null){
var body = document.getElementsByTagName('body')[0];
var text = document.createElement('input');
text.id = 'JSOutput';
text.style.display = 'none';
body.insertBefore(text, body.firstChild);
}
else {
document.getElementById('JSOutput').innerText = '';
}
var a = document.getElementsByClassName('rgMasterTable CaptionTextInvisible');
var c = '';
for (var i =2; i<a.length;i++){
var b = a.textContent.trim().split('
');
if(b[4].trim()!=='There are no records.'){
console.log(b[0] + ' --- ' + b[4].trim());
c = c + b[0]+':'+b[4].trim()+',';
}
}
return c.slice(0, -1);
}
--------------------------------------------------30-10-20 02:29 PM