Ken,
I'm confused. I tried:
function openLearner( lessonId )
{
if(isMac)
{
learnWin = window.open('home.do?method=learner&lessonID='+lessonId,'lWindow','width=796,height=570,resizable,status=yes');
}
else
{
alert("ken's case");
window.open('home.do?method=learner&lessonID='+lessonId,'lWindow','width=796,height=570,resizable,status=yes')
}
}
and I don't get any difference in behaviour in Firefox 1.5.0.6 - it still pops open a window. I understood that you were trying to get it to open in a tab - if so then there must be something different in our Firefox settings. Did I do the correct change to the code? Could you attach your updated openurls.js?
The code:
learnWin.location = 'home.do?method=learner&lessonID='+lessonId;
learnWin.focus();
document.location = 'home.do?method=learner&lessonID='+lessonId;
ensures that the window is updated with the new call and focus is switched to the window, to deal with cases where the popup window is already opened. We have to do this because we reuse the learner popup window everytime someone clicks on a lesson link, and if it gets hidden people just keep clicking on the link over and over again thinking that LAMS is broken because the window never appears.
So removing that code but staying with a popup window may leave people wondering where the learner window is - the worst of both worlds.
I'm not sure why we have a learnWin.location and document.location - this code is from 1.0.2 and was written so long ago I can't remember what the problem was that we were trying to work around.
Fiona
Posted by Fiona Malikoff