Javascript Popup Help plz

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

firestorm

Established Member
Impact
6
Hey,
I have an image on one of my sites that I want to link to a popup(not a bigger version of the image, but another site). Searched around and kept getting nowhere on other's examples. I want the height to be 288 and the width to be 150. I know how to do this on text links, just not image links. Here's what I have so far.
Code:
<a href="javascript:popup()">POPUP</a>
I want an a pic instead of a text link. Thanks a million!

-fire
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
What do you mean by popup? You want to open a new window when a link is clicked with a smaller size?
This isn't called a popup btw. Popups are automatically launched when a website is loaded and do not need a click to load.

You have to use window.open to have a new window of smaller size. Look here for examples http://www.pageresource.com/jscript/jwinopen.htm
 
0
Close
With
Code:
<a href="javascript:popup()">POPUP</a>
All you would have to do is replace POPUP with the html for the image. example:
Code:
<a href="javascript:popup()"><img src="url/to/image.jpg"></a>
 
1
Close
Thanks Dan, that worked perfectly! rep added :)
 
0
Close
If you get an ugly border just add border="0" to the code and it'll disappear.
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back