Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A simple question for you?

Status
Not open for further replies.

AlanGNW

Technical User
Joined
Nov 30, 2005
Messages
16
No doubt an easy question for you. I'm new to this... How would I use the a friend sent me to open from an image where it has the words 'new window'? Thanks

<span class="popup" onClick=javascript:window.open("testwindow3.htm",
"blank","toolbar=no,width=180,height=250,top=0,left=0")>new window</span>
 
You can replace the [tt]span[/tt] tag with an [tt]img[/tt] tag, for example:

Code:
<img src="path/to/your/image.jpg" alt="Alternative text describing this image" class="popup" onClick=javascript:window.open("testwindow3.htm","blank","toolbar=no,width=180,height=250,top=0,left=0")>
 
You don't need to use javascript: with event handlers.

Lee
 
Thank you. Worked perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top