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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Brighten an Image on Load(or Onclick)

Status
Not open for further replies.

laker67

Programmer
Jan 18, 2004
31
0
0
US
I was wondering if there is a function or method to Brighten an Image on Load(or Onclick) . The reason i need is i have an image gallery which lists all the images in smaller size on the left side of the webpage . when the user clicks on the smaller size image on left frame , it shows on the right side with its original size . I want to differniate the smaller image which the user clicked on the left frame from other images .
Thanks!!!!!!!!!!
 
You could use a simple image swap to an exact image except that it is made brighter with a graphics program like Paint Shop Pro.
Code:
<a href="bigImage.gif" onclick="image1.src= 'brightImage.gif';"
 	target = "therightframe">
 	 <img name="image1" src="dullImage.gif" border='0'alt='' ></a>
Hope it helps.

Glen
 

An easier option would be to put a border around the selected image using CSS, or you could use an alpha filter, but that's IE/Moz only, AFAIK... Or, use an image swap, as Glen suggests.

Hope this helps,
Dan
 
Thanks glenmac,BillyRayPreachersSon . I did use Border around and it works .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top