Open Resource in New Window

Open Resource in New Window

by Gerard Arthus -
Number of replies: 10

How do we direct a resource to open up in a new floating window and not a tab, in Moodle 2.x?

Average of ratings: -
In reply to Gerard Arthus

Re: Open Resource in New Window

by Christopher O'Kelly -

It depends where the resource is, but you can do this using the link options if it is somewhere with the rich text editor (such as a lesson or even, for example, these forums)

 

1. type the name of the link to be displayed

2. highlight it

3. click the link button on the editor toolbar (it looks like a chain link and is on the bottom row. The Insert/Edit Link box will appear

4. Click the popup tab up the top of this window

5. Tick "Javascript popup". you can now set the properties for the popup window. You will need to set popup URL to the same as your resource or content from before (for some more advanced usage cases you can have it be different). You can also set the size and position of the window as well as the title (which will appear at the top of the window).

6. There are some tick boxes at the bottom of the window. you can set these to match what you need, such as allowing the window to be resized, showing or hiding the scrollbars, toolbars and menus on the page, or making it dependent. If you make it dependent the javascript popup will only be used if the browser is firefox, meaning that IE/chrome/safari users will not have the extra possible hurdle of needing javascript enabled and will simply have it pop up in a new window using the settings you put in the first tab.

7. click OK. You should now have a link like this

 

If you have any trouble let me (or one of the more experienced users, I am no guru by far) know.

 

Edit: OK it appears that maybe the moodle forums have wisely disabled users adding javascript, as each time I actually post this it turns back into a normal link with no javascript event. But this should work fine on your own moodle site, as it did on mine when I tested there.

In reply to Christopher O'Kelly

Re: Open Resource in New Window

by Gerard Arthus -

Christopher,

 

Thank you, but the link you created opens a new window in the same tab. I would like to open a new floating window just like we could do with moodle 1.9 x when we created a web page resource for example.

Gerry

In reply to Gerard Arthus

Re: Open Resource in New Window

by Christopher O'Kelly -

Hi Gerry - see my edit. This cannot be done here in these forums (or so it appears, at least not on our level of access) but I have tested and this works fine on our moodle 2.x site, using firefox.

 

I am a little confused by your wording here... It opens a new window in the same tab? I'm assuming that you mean it opened a new tab in the same window, which is the same thing the link I posted here did to me (that's why I removed the link).

 

See below for dodgy screencaps with scribbled arrows, documenting the result and process

 

 

Have a little faith mate ;). Give it a go on your own server and let me know if it doesn't work!

In reply to Christopher O'Kelly

Re: Open Resource in New Window

by Gerard Arthus -

Christopher,

This looks great, but when I go to the page contents in my text editor it does not allow me to enter anything. I just installed Moodle 2.0.2, is there a bug in the text editor in this version?

 

Gerry

In reply to Gerard Arthus

Re: Open Resource in New Window

by Christopher O'Kelly -

hmm, that's odd. From the get-go I have no clue if 2.0.2 has a bug, I started using moodle all of 3 weeks ago and have only used 2.2 so far.

I'll just clarify though, you are talking about the text editor as in mce editor, the one that looks the same as the one you type in to post here on the forums?

 

Whereabouts are you in your moodle trying to do this? Are you adding this link in a lesson, an html block, or elsewhere? Are there other places in moodle you can/have been able to type into the text editor?

 

If you can't enter text in the editor at all we may be rapidly approaching "out of my league" territory. I have picked up the usage of moodles GUI pretty quick but I am still acclimatising myself to the backend stuff.

In reply to Christopher O'Kelly

Re: Open Resource in New Window

by Gerard Arthus -

Christopher,

 

The link buttons are greyed out also, so I cannot put links in any case. Maybe I will try to install 2.2 on my server.

 

Gerry

In reply to Gerard Arthus

Re: Open Resource in New Window

by Christopher O'Kelly -

Gerry,

Not that updating to the latest version isn't a good idea, but are you sure you've highlighted some text before trying to click the link button? It will be greyed out unless the cursor is on an already placed link (to edit that link) or you highlight some text (to turn that text into a link). If no text is selected then the link buttons are expected to be gryed out and unclickable.

Average of ratings: Useful (1)
In reply to Christopher O'Kelly

Re: Open Resource in New Window

by Gerard Arthus -

Christopher,

Then I will just have to figure out why I cannot enter any text into the text box. In the old version the links were always there regardless of whether a link was highlighted or not.

 

Thank you,

Gerry

In reply to Gerard Arthus

Re: Open Resource in New Window

by Rosario Carcò -

I remember there was a bug in inserting/opening links in 2.05. See here http://moodle.org/mod/forum/discuss.php?d=190095 if this is your case. At least you should upgrade to 2.07

Rosario

In reply to Rosario Carcò

Re: Open Resource in New Window

by Gerard Arthus -

Rosario,

Thank you, I guess that is the problem, I will be upgrading as soon as I can.

 

Gerry