We are loading the third party iframe in our html page. We are loading this in one particular div. Till this step it is working successfully. However, the next thing we want find the controls which are loaded inside the iFrame. Also, iFrame does not have any id associated to it.
Because of iFrame ID is not present we have tried like below to first get the iframe
var objiframe = $('#divContainer').find('iframe');
So here we are getting the iFrame object, but we are not able to find any controls which are residing under iFrame.
We have tried few ways like below to find the controls
var iFrameDOM = $(objiframe).contents();
var control = $(iFrameDOM).find("#duedate");
var data = objiframe.contentWindow.document.getElementById('duedate');
But somehow we are not getting the controls or there id. Most of the times we are getting 'undefined' or 'Cannot read property 'contentWindow' of null'
Any help on this appreciated