Hi everyBody;
I want to create a web site with using images as buttons.Actualy I manage the changin buttons when a mouse point at them ,but i couldnt find any proper solution when someone click one of my image buttons it will preserves its last image untill clicking anoher image.I wrote i code to make it but in the code as you can see the disabled function is not work?Do you have any idea for this.
my Code is==>>
<script language="JavaScript">
var prevClicked = "";
Imgpath="../images/styleguide/";
function staySet(curr,imgName){
tmpStr = curr.toString();
if (prevClicked == "")
{
document.getElementById(curr).disabled = true;
prevClicked = curr;
}
else
{
document.getElementById(prevClicked).disabled = false;
document.getElementById(curr).disabled = true;
prevClicked = curr;
}
}
function SwapImage(curr,imgName) {
tmpStr = curr.toString();
var swap = event.type;
if (swap == 'mouseover')
{
document.getElementById(curr).src=Imgpath+imgName+'_prs.gif'
document.getElementById(curr).disable=false;
}
if (swap == 'mouseout')
{
document.getElementById(curr).src=Imgpath+imgName+'_def.gif'
}
}
</script>
Thanks for your consideration
rayesteq