Inside an Ajax popup I have a GridView.
I want to access the GridView from javascript.
As it is inside popup I am unable to use document.getElementById
I used document.GetElementsByTagName and accessed popup in javascript.
How开发者_运维问答 to traverse to the gridview inside that popup?
Can't you just use something like:
document.getElementById('<%= YOUR_GRIDVIEW_ID.ClientID %>')
?
If your "ajax popup" is a DOM iframe, use myIframe.contentDocument
to get its DOM document.
Since you accessed the popup with document.getElementsByTagName
, you obviously know the tagName of your popup. From there, you can use MSDN to find the way to access your popup's content.
精彩评论