Have a dropdown with a bunch of links alongwith Open directly, Next and Previous buttons on IE8.
var count = -1
var total = 24
function goToNext()
{
count = parent.nav.openfile.file.selectedIndex
count ++
if (count > total)
count = 0;
parent.display.location= parent.nav.openfile.file.options[count].value
parent.nav.openfile.file.selectedIndex = count
}
function goToPrevious()
{
count = parent.nav.openfile.file.selectedIndex
count --
if (count < 0)
count = total;
parent.display.location=parent.nav.openfile.file.options[count].value
parent.nav.openfile.file.selectedIndex = count
}
function LoadFirst()
{
parent.display.location=parent.nav.openfile.file.options[0].value
}
function OpenDirectly()
{
parent.display.location = parent.nav.openfile.file.options[parent.nav.openfile.file.selectedIndex ].value
}
<FRAMESET ROWS="45,*">
<FRAME
BORDER="1"
FRAMEBORDER="YES"
MARGINHEIGHT="10"
MARGINWIDTH="10"
NAME="nav"
SCROLLING="NO"
SRC="/Slide/test.jsp"
/>
<FRAME
BORDER="1"
FRAMEBORDER="YES"
MARGINHEIGHT="10"
MARGINWIDTH="10"
NAME="display"
ID="display"
SCROLLING="AUTO"
SRC="/page.html"
/>
</FRAMESET>
Above is the code(test.jsp followed by the HTML code containing main frame and navigation frame – the navigation frame is navigation and all the links within it should open within the main frame) which gets called on click of these buttons to move forward, previous or load directly. The issue is that these links open in either new window or new tab but never in same window. Would highly appreciate if anyone provides any recommendations around the same.
On every link of navigation page, you need to add the target of the
displayframe or better add<base target="display">to the head section oftest.jsp. The target decides where to open the link in.