I’ve got a random image script that works fine. I’m trying to open a link in a specific window size which doesn’t want to work and applied to the random image link.
It works fine if it’s not in the random image script.
Is there any way to make it work within the random image script?
Here is my code:
<SCRIPT LANGUAGE="Javascript">
function banner() { } ; b = new banner() ; n = 0
b[n++]= "<a href='https://youtu.be/IeIqaNR5Zs4' target='_blank'
onclick='window.open(href, '', 'height=300, width=450,
left=300, top=300'); return false;'> <IMG name=randimg
SRC='images/random/balboapark.png' alt='Balboa Park Picture'>"
b[n++]= "<a href='https://www.youtube.com/watch?v=w6UzpzMwwT8'> <IMG
name=randimg SRC='images/random/zoo.png' alt='San Diego Zoo Picture'>"
b[n++]= "<a href='https://www.youtube.com/watch?v=w6UzpzMwwT8'> <IMG
name=randimg SRC='images/random/zoo.png' alt='San Diego Beach Picture'>"
i=Math.floor(Math.random() * n) ;
document.write( b[i] )
</SCRIPT>
This opens in the specific window size.
<a target="_blank" href="https://youtu.be/IeIqaNR5Zs4"
onclick="window.open (href, '', 'height=300, width=450,
left=300, top=300'); return false;"><IMG SRC='images/random/balboapark.png'
alt='Balboa Park Picture'></a>