arielmorry
06-05-2011, 09:06 AM
Hi,
i have login form that is shown by clicking an image,
i using the following function to toggle the form visibility,
in addition to what this function does, i need to create different images for mouse over, on click and mouse out, but, i need 6 states, 3 for when the div's visibility is on and 3 when it's off.
thanks for your help, i'm kind of lost here so anything will be good...
javascript:
function toggle() {
var ele = document.getElementById("LoginIframe");
var text = document.getElementById("toggleLogin");
if(ele.style.display == "block") {
ele.style.display = "none";
document.getElementById('toggleLogin').innerHTML = "<img src=img/__Up_Closed.png></img>";
}
else {
ele.style.display = "block";
document.getElementById('toggleLogin').innerHTML = "<img src=img/__Up_Open.png></img>";
}
}
html:
<div><a id="toggleLogin" href="javascript:toggle();" class="signin"><img src="img/__Up_Closed.png" alt="" /></a> </div>
i have login form that is shown by clicking an image,
i using the following function to toggle the form visibility,
in addition to what this function does, i need to create different images for mouse over, on click and mouse out, but, i need 6 states, 3 for when the div's visibility is on and 3 when it's off.
thanks for your help, i'm kind of lost here so anything will be good...
javascript:
function toggle() {
var ele = document.getElementById("LoginIframe");
var text = document.getElementById("toggleLogin");
if(ele.style.display == "block") {
ele.style.display = "none";
document.getElementById('toggleLogin').innerHTML = "<img src=img/__Up_Closed.png></img>";
}
else {
ele.style.display = "block";
document.getElementById('toggleLogin').innerHTML = "<img src=img/__Up_Open.png></img>";
}
}
html:
<div><a id="toggleLogin" href="javascript:toggle();" class="signin"><img src="img/__Up_Closed.png" alt="" /></a> </div>