[not part of build] tweak to prevent multiple alerts from coming up.

This commit is contained in:
beard%netscape.com 2000-11-18 01:57:15 +00:00
Родитель 42dcb3939f
Коммит acf4826bad
1 изменённых файлов: 0 добавлений и 50 удалений

Просмотреть файл

@ -1,50 +0,0 @@
<!--
Simulate a standard push button using JavaScript Image objects.
This works by defining various event handlers directly in
the IMG element. The onMouseDown handler calls event.preventDefault()
to inhibit a drag gesture during button tracking. Thanks to
lordpixel@mac.com for providing sample DHTML to start from.
-->
<HTML>
<HEAD>
<TITLE>Test Button</TITLE>
<SCRIPT>
var buttonURI = "theme:button?width=40&height=20&title=OK";
if (document.images) {
buttonImages = new Array();
buttonImages[0] = new Image;
buttonImages[0].src = buttonURI;
buttonImages[1] = new Image;
buttonImages[1].src = buttonURI + "&pressed=true";
}
function buttonDown()
{
document.button.src = buttonImages[1].src;
}
function buttonUp()
{
document.button.src = buttonImages[0].src;
}
var isMouseDown=false;
var inButton=false;
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" onMouseUp="isMouseDown=inButton=false;">
<H1>Button Test</H1>
<IMG
id="button"
name="button"
src="theme:button?width=40&height=20&title=OK"
border=0
onMouseDown="buttonDown(); event.preventDefault(); isMouseDown=inButton=true;"
onMouseOver="if (isMouseDown) { buttonDown(); inButton=true; }"
onMouseUp="buttonUp(); isMouseDown=inButton=false; alert('Well OK!');"
onMouseOut="if (isMouseDown) { buttonUp(); inButton=false; }"
>
</BODY>
</HTML>