Reputation: 3736
I have an asp.net web app that is using an iFrame (called "fraContent") within the aspx page. In the iFrame, I have a hidden field (called "hdnCounter") that stores a "counter" value.
From the parent aspx page, how can I access that hidden value from the iFrame?
alert(document.getElementById('window.fraContent.hdnCounter').value);
does not seem to work
Upvotes: 0
Views: 1351
Reputation: 114347
The ID of the element is not window.fraContent.hdnCounter
, so getElementById
will not work.
You simply want: alert(window.fraContent.document.getElementById('hdnCounter').value)
Upvotes: 2