Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

How do I make a bookmark / favorite / weblink or command line command, that opens a webpage in a small window?

For example, this page for BBC Radio 6 has a link for Listen Live, which opens the player in a small window. But when I bookmark that window and use it, I get a full sized window.

I guess it is done with JavaScript. But how do I find the JavaScript used, and how do I apply it to a bookmark file (or command line)?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

You are correct you do this using JavaScript.

Create a new bookmark and instead of putting the web address in you would use this:

javascript:function LoadPlayer() { return window.open("http://www.bbc.co.uk/iplayer/console/bbc_6music","BBC 6 Music","scrollbars=no,menubar=no,height=721,width=400,resizable=yes,toolbar=no,location=no,status=no");} LoadPlayer();

When you click the bookmark it will open in a new window.

The JavaScript used to do this is called window.open

share|improve this answer
    
Thanks. I've tried this (on Windows), but when I click on the .url file I get IE9's download manager come up instead, even when Firefox is the default browser. Which setup are you using? –  paradroid Jan 20 '11 at 15:25
    
@paradroid - I am using Google Chrome on Windows 7 –  Barry Jan 21 '11 at 8:15
    
But without IE9 Beta installed? It looks like this JS bookmark does not work with IE9, as it brings up its download manager for some reason. –  paradroid Jan 21 '11 at 8:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.