javascript - "Open Link in new Tab" should not open the iFrame-source-page -
so let's have page www.aaa.com/iframe-of-page-b. inside of display page www.bbb.com iframe.
my issue: when click "open link in new tab" on link inside iframe www.bbb.com opens new tab in browser.
what accomplish: when clicking "open link in new tab" inside iframe, open page, looks 1 user sees iframe first, in case should open www.aaa.com/iframe-of-page-b www.bbb.com-iframe inside of , link, clicked.
solution 1
generate links re-create iframe'd page.
<a id="link1" target="_top" href="/my_iframe_page.html?my_frame=some_frame">link</a>
then intercept click event via javascript "normal" clicks change inner frame. otherwise every time user clicks it, whole page (including outer frame) blink.
solution 2
prevent links opening in new tab altogether
<a id="link1">link</a>
specify no href
@ all. "open in new tab" browser menu won't work. make normal clicks work, intercept click event via javascript.
Comments
Post a Comment