hi I'm new to zen cart and am trying to make buttons move or click in when pushed but i don't know code very good so i don't what to do please help. a .gif image that shows what i am talking about has been attached. Thanks ahead of time![]()
hi I'm new to zen cart and am trying to make buttons move or click in when pushed but i don't know code very good so i don't what to do please help. a .gif image that shows what i am talking about has been attached. Thanks ahead of time![]()
Why and where in ZenCart are you trying to do this?
Zen-Venom Get Bitten
all buttons will do this in zen cart. why because i want the buttons to be like the button actually pushes in and pops back out i don't want it to stay pushed i want it to be like pushing a button on your keyboard.
i found this html code it does what i want but is this what i do in zen cart?
<html lang='en'>
<head>
<meta http-equiv='Content-type' content='text/html;charset=UTF-8'>
<title>Image Click</title>
<script type="text/javascript">
function clickDown() {
var Bdown = '<img src="pic2.png" alt="picture" onmouseup="clickUp()">';
document.getElementById('b').innerHTML = Bdown;
}
function clickUp() {
var Bup = '<img src="pic1.png" alt="picture" onmousedown="clickDown()">';
document.getElementById('b').innerHTML = Bup;
}
</script>
</head>
<body>
<h1></h1>
<p><span id="b"><img src="pic1.png" width=159 height=100 alt="picture" onmousedown="clickDown()"></span></p>
</body>
</html>
The zen-cart button-related functions are located in /includes/functions/html_output.php.
OK thanks. what would i change in this file and will all buttons do it or does each button have to be set separately
in this file what do i change please forgive me I'm new to all this code stuff and i do not want to change anything until i know what I am changing
It might be simpler to use the stylesheet for this. I Googled for "button click visual effect using CSS" and got some good links talking about this.
Rob
OK thanks but I'm not sure what i should be looking for on goggle ??? Is there a way to make a button that is 2 different size images of the same button. When you click the button the smaller button image appears then the big button image reappears to make a push in effect for the button??
Last edited by kab_death; 15 Feb 2010 at 03:43 PM.
i would just like to thank all of you for your help so far but I'm still stuck if someone could give an example of how to do this it would help very much. thanks again
I'm just learning sorry