A lot of beginners easyui people will encounter such a problem, that is, in the page with the IFRAME tag, when the direct designated SRC page is a Easyui component of the page, when the parent window needs to access the object in the IFRAME, should not use document access , you should access the object of the IFRAME so that you can access the object's properties and methods using the standard APIs in Easyui, which are accessed in two ways:
1, document.getElementById (' Ss_frame '). contentwindow.$ (' #dgMANUF '). DataGrid (' getselected ');
2, $.find (' iframe ') [0].contentwindow.$ (' #dgMANUF '). DataGrid (' getselected ');
Do not use $ (' #ss_frame '). contentwindow.$ (' #dgMANUF '). DataGrid (' getselected '); Such code, because the object cannot be returned correctly in jquery, the system prompts "Cannot get Properties" NodeName "Value: object is null or undefined error".
The problem of accessing an object solves another problem. iframe refresh problem, because we may be using dynamic pages, we see many solutions that as long as the object's SRC modification can be correctly displayed, but we found that the system has a delay, and this is a fatal error for the Scripting client. The solution is actually very simple, that is, directly to the object of the IFRAME output a hint, until the page load completed. The specific resolution code is as follows:
document.getElementById (' Ss_frame '). ContentWindow.document.write (' Loading ... ');