proper syntax for adding a counter to a function so it only fires once?
Pretty basic stuff here, just making a css based hover ad, but once the user hides it I don't want it to fire again, for obvious reasons, and also because the users mouse would be hovering over the div that would fire it when they tried to close it, so it is impossible to hide it.
current sudo-code (sorry I'm not a programer) looks like this:
===============
var count = 0; //set counter to 0
// if counter is equal to 0, do this function,
// which includes adding one to the counter at the end of the function
// theoretically the next time it tries to fire it should find that
// count no longer equals 0, and not fire
function show_pop(){
if (count == 0);{
document.getElementById("box1").style.top = "300";
count ++;}
}
function hide_pop(){
document.getElementById("box1").style.top = "-600";
}
============
and it fires the first function, show_pop, like so:
<div id="leftColumn" onMouseOver="show_pop();">
and fires the second function, hide_pop, like this:
Bookmarks