• Resolved davidorr

    (@davidorr)


    Hey there,

    I’ve got a standalone flash-based mp3 player that plays my music on my blog. I have a link to it in my links category in the sidebar which opens up in a new window. The problem is, the new window is a full screens size. The player is small, and it looks ridiculous by itself. I would like to be able to launch it in a new window that is sized appropriately to the player. I know it can be done using Javascript, but is there any way to do this on wordpress?

    Thanks,

    David Orr

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you use widgets, you can put your javascript in a text widget and put it in the sidebar. The advantage of that is you don’t need to edit your theme files

    Or you can directly edit your sidebar. This means editing your theme files, but might be your preference.

    Javascript it the way to go if you want a custom window size on an onclick.

    Thread Starter davidorr

    (@davidorr)

    Alright, I’ve got what I need, but I’m not exactly sure how to actually resize it. I’ve looked around google for code snipits, but none of them actually resize the window. Any ideas?

    Thanks,

    David Orr

    Resize? It doesn’t need to be resized after it’s opened, it can be opened at the right size to start. That can be done with an onclick for your link. I might make a little listen picture, and then apply an onclick to it.

    <img onclick="window.open('whateverpage.html','','width=200,height=100,scrollbars=no')" src="images/listenimage.jpg" alt="Listen!">

    If I haven’t make a typo, that example should display an image, and when you click it, open a new window 200 x 100 and have scrollbars off.

    Would that suit you?

    Thread Starter davidorr

    (@davidorr)

    Thanks a lot, just what I was looking for. Got it all working now, thanks for the help!

    glad you’re sorted!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Linking: Resize Window?’ is closed to new replies.