javascript - HTML anchor tag in an iframe -


i have weird issue in chrome (only in chrome).

i have page std layout (header,content,footer left , right margin). content section has iframe containing many anchor tags of form <a href="#" onclick="dosomething()">text</a>

when of anchor tag clicked, header goes hidden. anchor tag of same form outside iframe works fine.

i have verified dom has header elements intact. display not 'none' (zooming in page 150%, header starts appearing slightly).

when force browser redraw page, changing css attribute(height) of content section , header appears.

when change href '#' '#nonexistent', link works fine.

one quick fix change href to, javascript:void(null); (and works too) or equivalent. i'm somehow constrained can't add scriptlets. looks weird. can help/point me right direction?

try changing/adding target attribute anchor tags in iframe. i'm not whether header disappearing within iframe or parent page, guess want target="_parent".

also, javascript:void(null) should javascript:void. void type, not function. calling (null) unnecessary.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -