Forum LAMS for Tech-Heads - General Forum: Re: Why so many browser windows in LAMS 2?


 
Search: 

2: Re: Why so many browser windows in LAMS 2?
In response to 1 09/18/06 04:35 PM
[ Reply | Forward ]
Hi Ken,

Yeah, it makes a lot of sense and if it solves your requirements, that's even better.

Now does the window.open('home.do?method=learner&lessonID='+lessonId,'lWindow','width=796,height=570,resizable,status=yes'); opens a window in a new tab?

Do you know what's the behaviour of this in IE6?

Ernie

Posted by Ernie Ghiglione

3: Re: Re: Why so many browser windows in LAMS 2?
In response to 2 09/18/06 05:22 PM
[ Reply | Forward ]
Ken and Ernie,

I suspect this is primarily a look and feel issue, not a technical issue.

Possible bits that may break? Learner would be the obvious one as we do the most mucking around with replacing bits of the window.  Looking at the call I assume you end up with a named tab, rather than a named popup window so it probably will be okay but I'd have to test it.

One of the reasons we have popup windows is that the original design of LAMS was to have windows without menus - to reduce the risk of people going to their favourites bar and selecting another link, hitting the back button on the toolbar, etc.

So while I agree that LAMS doesn't follow the current convention of opening up in different tabs, I can't just change this without it being okayed by James, et al.

Of course, if we had calls in one particular direction from the user community, that might just sway the decision that way. Hint: if you are LAMS user out there reading this and would much rather have tabs rather than popup windows, now is probably a good time to post! :-)

Regards,

Fiona

Posted by Fiona Malikoff

4: Re: Re: Re: Why so many browser windows in LAMS 2?
In response to 3 09/18/06 06:43 PM
[ Reply | Forward ]
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

6: Re: Re: Re: Re: Why so many browser windows in LAMS 2?
In response to 4 09/20/06 06:40 AM
[ Reply | Forward ]
In 1.5.0.7 (I'm sure the version difference doesn't matter) I don't get a new window when I use the following.

By the way, it would be nice if somehow when you control-click you get a new tab (like FireFox and IE7) and otherwise you re-use the current window/tab. (Assuming the learning designer wants this.)

Best,

-ken

function openLearner( lessonId )
{
if(isMac)
{
learnWin = window.open('home.do?method=learner&lessonID='+lessonId,'lWindow','width=796,height=570,resizable,status=yes');
}
else
{
// updated by Ken Kahn on 180906
// if(learnWin && learnWin.open && !learnWin.closed )
// {
// learnWin.location = 'home.do?method=learner&lessonID='+lessonId;
// learnWin.focus();
document.location = 'home.do?method=learner&lessonID='+lessonId;
// }
// else
// {
// learnWin = window.open('home.do?method=learner&lessonID='+lessonId,'lWindow','width=796,height=570,resizable,status=yes');
// }
}
}

Posted by Ken Kahn

5: Re: Re: Re: Why so many browser windows in LAMS 2?
In response to 3 09/19/06 09:18 AM
[ Reply | Forward ]
I suppose this could be up the designer of each individual learning sequence. For some it may be important to restrict the browser, for others one window may be preferable. It could be an advanced authoring option.

I'll be back in Oxford tomorrow and respond to the other questions (and test it a bit better).

Best,

-ken

Posted by Ken Kahn

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum