i want to have two text boxes and a button
when the button is pressed it invokes the shake function and shakes for whatevers in the text boxes
thanks in advance
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<html>
<head>
<SCRIPT LANGUAGE="JavaScript1.2">
function shake(n,z) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(z,0);
self.moveBy(-z,0);
}
}
}
}
</SCRIPT>
</head>
<body>
<input name="x" type="text" value="10" />
<input name="y" type="text" value="10" />
<input name="button" type="button" value="Shake" />
</body>
</html>
when the button is pressed it invokes the shake function and shakes for whatevers in the text boxes
thanks in advance
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<html>
<head>
<SCRIPT LANGUAGE="JavaScript1.2">
function shake(n,z) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(z,0);
self.moveBy(-z,0);
}
}
}
}
</SCRIPT>
</head>
<body>
<input name="x" type="text" value="10" />
<input name="y" type="text" value="10" />
<input name="button" type="button" value="Shake" />
</body>
</html>