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

Button Press Option

Status
Not open for further replies.
Mar 29, 2002
33
US
I've created a few buttons on my webpage that load pages within a ‘main’ frame of the frame structure (header, footer, content, main). I've created the buttons in Photoshop and they look nice, however I’d like them to move or depress when I click on them. Can this be handled with XHTML or does this involve some kind of Java script.

Thanks, Red
 
javascript... onClick, onMouseOver, onMouseDown, etc....

example:
onMouseDown='this.src="botton_pressed.gif"'
 
To elaborate on chacalinc's response... you nee TWO images to do this - one for the "UP" and one for the "DEPRESSED". Using a javascript onmouseover/onmouseout routine, (or on onclick event) you would call the two different images of the same button. Look in the Javascript forum for help with the script.

There's always a better way. The fun is trying to find it!
 
I'll look through the Java forum and my Java book at home this evening, thanks for the help everyone.
Red-
 
Java is not Javascript. Make sure you don't make that mistake. You can do a similar effect to that with JavaScript by using link pseudo classes in css and backgrounds.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top