I don't understand new windows, new tabs and popups

I don't understand new windows, new tabs and popups

by Mary Cooch -
Number of replies: 17
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Well, I just put that for an interesting title but what I mean is.... (and this is in the Lounge, not Using Moodle because it's a general discussion that's not unique to Moodle although for me, it does involve Moodle) We want to add some key dates on the front page of our Moodle (which we use as a website) As there are quite a few key dates,we thought we'd make a hyperlink to a page and get it to open in a new window/pop up -making it quite small - 500x500 for instance - so people could check the dates and still have Moodle in the background. But can I find a way to do this? Any time I try "new window" "_blank" or whatever, it opens in a new tab. I have learned that my browser settings do this -  but that's no good for us because we want our pop up key dates to display the same for any readers on any browser (or at least IE which the majority of ours use) I want something like what you get with an auto-linked glossary entry -that pops up! (I did try that but it would confuse readers if they then clicked on to the glossary itself) I have tried some javascript pop up code I found online but it opens in a new tab.  I am stuck. I am about to add a thoughtful face emoticon and it is going to open in a pop up box just how I want our keydates to open....thoughtful

Average of ratings: -
In reply to Mary Cooch

Re: I don't understand new windows, new tabs and popups

by ben reynolds -

I'm pretty sure you can't do this, between users who still have popup blockers and the user's control over whether a popup will be a popup or a new tab.

Intriguingly, when I click on the attached file, my currently open FF15 instance opens a new tab to tell me it has blocked a popup clown

In reply to ben reynolds

Re: I don't understand new windows, new tabs and popups

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I was prompted to download it myself.. and yes, I am beginning to think the same. We'll have to rethink how to display our long list of key dates - or else accept that they will get opened in a new tab.

In reply to Mary Cooch

Ang: Re: I don't understand new windows, new tabs and popups

by Bente Olsen -
Picture of Testers Picture of Translators

Don't give up using a glossary. Place it in the main menu block, add your events/dates and then delete the block. Autolinking vil give you your small pop up cool

If you need the main menu for other things replace it with a HTML block with your links to acitvities/ressources.

Finish the operation with your fingers crossed that the Moodle code will not prevent this in the future smile

Average of ratings: Very cool (1)
In reply to Bente Olsen

Re: Ang: Re: I don't understand new windows, new tabs and popups

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hello Bente. That's what I did with the glossary - adding it in the main menu block and hiding the block. I added only one entry with a list of dates and it displayed fine as a pop up linking to "key dates" The problem was that there was a link at the bottom right of this glossary entry that took you to the glosssary main page-and that would have really confused people who didn't understand what it was. I can't edit the code to remove that link and so the glossary then was no longer an option.

In reply to Mary Cooch

Ang: Re: Ang: Re: I don't understand new windows, new tabs and popups

by Bente Olsen -
Picture of Testers Picture of Translators

Hi Mary

Which version of Moodle do you use? My 2.3.1 do not have a link to the glossary in the popup, but I can have entries for every date that the initial popup can autolink to. Still without links to the glossary itself.

In reply to Bente Olsen

Re: Ang: Re: Ang: Re: I don't understand new windows, new tabs and popups

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi Bente. My school is currently still on 1.9. (Don't asksmile) However, I have had another go with the glossary suggestion as you can see in my other forum post below. I want all dates on one page as you can see but I have tried to make the link back not very obvious.

In reply to Mary Cooch

Re: Ang: Re: I don't understand new windows, new tabs and popups

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Mary,

Could you use a specificly targeted css to hide that glossary link - will Moodle allow a specific enough selector without affecting other glossaries in use? I'll have a play when I'm back in work next week and see what happens - if you find another solution I'll still have a play for my own learning anyway :D

Richard

In reply to Richard Oelmann

Re: Ang: Re: I don't understand new windows, new tabs and popups

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

At the moment I have decided to use the glossary link but I called the glossary . (that is, "full stop") so that when a user opens up the link they are likely to  miss the link back bottom right...see screenshot from my test Moodle here. I can't  edit any files as we don't host it so I can't do more than that but it might just fool enough people as to be useful ...

In reply to Mary Cooch

Ang: Re: Ang: Re: I don't understand new windows, new tabs and popups

by Bente Olsen -
Picture of Testers Picture of Translators

Unfortunately I can not hide the glossary in the navigation block, but there is no links to it in the pop up and not Glossaries  - Search in the navigation bar either.

Attachment Skærmdump.png
In reply to Bente Olsen

Re: Ang: Re: Ang: Re: I don't understand new windows, new tabs and popups

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Actually (going slightly off topic Bente) with 2.3 you can hide the glossary in the navigation block.  There is a new setting in Settings>Site administration>Appearance :Show front page activities in the navigation where you can turn off such items as glossary.

In reply to Mary Cooch

Ang: Re: Ang: Re: Ang: Re: I don't understand new windows, new tabs and popups

by Bente Olsen -
Picture of Testers Picture of Translators

Oh yes, that's right, I have forgotten that. Thanks for the reminder.

So now we have the situation that I can do what you want on my installation but you can not in yours? It seems that it is an issue for a technically skilled person.

In reply to Bente Olsen

Re: Ang: Re: Ang: Re: Ang: Re: I don't understand new windows, new tabs and popups

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

This particular installation (my school) is externally hosted along with 700+ other schools in our educational area so we don't have control over the administration - but there are other benefits.

In reply to Mary Cooch

Re: I don't understand new windows, new tabs and popups

by Glenys Hanson -

Hi Mary,

Not sure if this will be helpful. I use this code to get a popup window from within a HotPot exercise:

<a style="cursor: pointer; "onclick="window.open('findit_type1_tutorial.htm','boxes','resizable=yes,width=700,height=393');return false;"><img src="help.jpg" alt="help.jpg" title="Help!!!" width="50" height="49" style="float: left;"></img></a><img src="lady.png" alt="lady.png" title="Lady" width="123" height="200"></img><br />

You can see the result here if you click on the lady scratching her head : There was an old man from Darjeeling.

Sorry I can't credit the kind person who showed me how to do that.

Cheers,

Glenys

In reply to Glenys Hanson

Re: I don't understand new windows, new tabs and popups

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Glenys - I tried this and I can get it to pop up in Internet Explorer and Firefoz but in Chrome nothing happens at all -whereas on your site it works fine in Chrome. I shall ask whether the school will accept it working only in IE and FF - and I have to say you have taken me further in my quest than I have got so far, so thankyou! But I wonder if anyone knows why it won't open up for me in Chrome?

In reply to Mary Cooch

Re: I don't understand new windows, new tabs and popups

by Derek Chirnside -

After a little fiddling and googling this topic got to much for me very quickly Mary.

Some data.  Page opens OK in all browsers:

  1. FF: I have FF 14.0.1 with popups blocked in Options, and it will not let my webmail work unless I list as an exception. But if I add a page in Moodle (2.3.1) with popup, it does give me the popup. 
  2. IE: My Moodle page with popup also opens in a popup in IE, again with "popups blocked".
  3. CHROME: opens OK in that.  But I cannot find a setting to check.

From a random post a whle back on Mozillazine: "If I had my way I would euthenize all employees of that company and televise the whole thing so that people could take satisfaction in seeing these cockroaches die slowly. Popups are evil" - I presume they mean random popups that occur with no clicks, like the adverts or "Join me" posts. 

Stackoverflow has threads on this: http://stackoverflow.com/questions/9514698/bypass-popup-blocker-on-window-open-when-jquery-event-preventdefault-is-set

What this all means I don't know.  If I click and WANT to open a page, surely it's not a problem to have it open in a Popup; the pop blocker should be for nasty popups?

-Derek

In reply to Mary Cooch

Re: I don't understand new windows, new tabs and popups

by Russell Waldron -

Popups are a neat solution for most of us. It's really hard to design interfaces without them.

On the other hand, we don't just have to design for 4 desktop browsersPopups may be hard to use with visual impairment and with some assistive technology. Popups may not work on mobile devices. Those categories are probably growing in importance.

In reply to Mary Cooch

Re: I don't understand new windows, new tabs and popups

by Kathy Filatreau -

Hi Mary... I just went through two days of trial and error, but got a result I like.  The following is an explanation of what I wanted to do, and the steps I took to get a result.

I wanted a Lightbox image gallery to open up in a popup window so that students voting on their favorite image could view the images in a separate window while voting in the Questionnaire activity from their Moodle page.

 

In the Description for the Questionnaire:

As part of the directions type "Click here to see: Images”

Highlight the word Images

Click on the Link icon

Click directly on the Popup tab (bypass the General tab)

Click the box for JavaScript popup

Paste the URL for the activity (in this case the Lightbox image gallery)

Add x (600) and px (450) dimensions (x must be width, px height)

Click the box for Make window resizable

Click Insert