Does not scroll anchor links with in the iframe

Hi, I have been trying to include anchor links for the particular type of HTML tags within the confluence macro body. I could able to set the anchor links for the specific tags but it does not scroll to the particular anchor link on click event within the iframe. Please help me to make it work within the iframe.

Any help would be most appreciated.