0

In the WordPress theme I am using there is an area for HTML banner code. At the moment it contains the following:

<a href="http://bathcitysound.com/streaming/player.html">
<img src="my-image-code-goes-here" /></a>

All is well and good, and it functions as it should and when clicked it goes to the specific page. However, what I actually want to happen is when the image is clicked, it opens a pop up window of 300 pixels wide and 600 pixels height with this as the address:

http://bathcitysound.com/streaming/player.html

What should I add to the existing code to make that work?

1 Answer 1

0

This should work:

<a href="javascript:window.open('http://bathcitysound.com/streaming/player.html','yourWindowTitle','width=300,height=600')">
    <img src="my-image-code-goes-here" />
</a>

You can try in your browser, by going to this URL:

javascript:window.open('http://bathcitysound.com/streaming/player.html','yourWindowTitle','width=300,height=600')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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