Help with window size please

Discussion in 'HTML & Website Design' started by deemainer, Mar 29, 2010.

  1. #1
    Hi there

    Im looking for a way to open a window (not a pop up... link clicked) in a small window 700x300 with no scroll bars etc for an audio player. Can anyone point me in the right direction that is cross browser compatible?

    Thanks
     
    deemainer, Mar 29, 2010 IP
  2. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There is no real way to do this with 100% (and I mean 100%) cross browser compatability as it will rely on Javascript to re-size the popup and what happens if I have JavaSript off or I am using Lynx? - Answer it doesn't work as I said in 100% cases. If you want that then just use a <a href="page name" target="window_new">Link</a> now, if you want a popup without 100% true compatability (more like 98%) there are losts of ways to do it. JavaScript is the best option and then you have to look at which type of JS. Do you have JQuery, MooTools etc or just plain JS. Also, don't forget popups can get blocked by popup blockers not everybody likes them.

    Here is standard & basic JS example

    <script type="text/javascript">

    function newPopup(url) {
    popupWindow = window.open(
    url,'popUpWindow','height=700,width=300,left=10,top=10,resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,directories=no,status=no')
    }
    </script>

    <a href="JavaScript:newPopup('http://your link');">Open a popup window</a>

    Best to put a title in the link to tell people opens in a new window e.g.: <a href="JavaScript:newPopup('http://your link');" title="Opens in new window">Open a popup window</a>

    Only thing left to do is work out how somebody like me (I don't open "popup" style links) gets to see/hear your content.

    In reality it may be better to just use a page based mp3 type player no popup/small window neded, I can just click on the link and the player would start. A number of those round (free) and propb. a better option. keeps me on your page and being a link to activate does not take up load time etc. till I click the link.
     
    parotstalk, Mar 29, 2010 IP
  3. deemainer

    deemainer Active Member

    Messages:
    351
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    78
    #3
    thanks parotstalk

    Very helpful indeed. Appreciated. The idea is that a the player is for a shoutcast stream so it would sit there once opened and possibly be left .Hence the new window. I thought pop up blockers generally let the window open if opened as the result of a click? Is that not true?

    If i leave the resize JS off and just let it open in a new window then what controls the new window size? I seem to get different sizes opening up for different things.
     
    deemainer, Mar 29, 2010 IP
  4. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi Deemainer

    Couple of things:

    I thought pop up blockers generally let the window open if opened as the result of a click? Is that not true? - Not true, they give "me" the option to allow or not. So if I don't allow then again your content wont be heard.

    If I leave the resize JS off and just let it open in a new window then what controls the new window size? - umm nothing!

    What is your definition of a Shoutcast? My blog russellparrott.com has a podcast facility which generates it's content live from the content of each post, plus the added facility that the whole blog is available via MP3/itunes etc direct from the appropriate RSS feed.

    If you could explain a bit more exactly what you are looking to acheive I may be able to point you the "right" direction. Note I have certain reservations
    1 - I write about internet marketing
    2 - I am heavily involved in internet accessinility
    3 - the same goes for usability
    So any suggestions I may be able to give you are based on getting your message out to the widest audience which may not "fit" with your design ideas. Sadly often the 2 don't go hand in hand.
    Also if you can give me a url I'm in a better place to see/view/comment.
    Regards
    Russell
     
    parotstalk, Mar 29, 2010 IP