There is a navigation bar and iframe in page A. Clicking the link in the navigation bar displays page B in the iframe. However, when I right-click the mouse to open the navigation bar link in a new window, the page that pops up is just a separate page B. I The page you want to pop up is page B displayed in an iframe in page A. Can any brother help me? Thanks!
Check the code on page B. If the page is not in an iframe, jump to page A and pass the current page identifier in the address bar parameter
Check the code on page B. If the page is not in an iframe, jump to page A and pass the current page identifier in the address bar parameter
However, the page will flash for a while and the experience is not good
A better approach is:
The link points to page A and the address bar parameter passes the address of page B of the link, so that when a new page opens, page A will be opened, and it is judged to load the corresponding page B
Then add an onclick event to the link , modify the src of the iframe, and return false, so that clicking the link page will not jump
Thank you, I am a novice, can you give me the code for reference? Thanks!
<frameset rows="64,*" frameborder="NO" border="0" framespacing="0"> <frame src="index.html&id=000" noresize="noresize" frameborder="0" name="topFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" /> <frameset cols="200,*" rows="800,*" id="frame"> <frame src="index.html&id=001" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" target="main" /> <frame src="index.html&id=002" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="_self" /> </frameset></frameset>
I am using an iframe, can you give me the code for the iframe? I don't often use the framework given above, so I don't understand it a bit?
My navigation bar is outside the iframe.