For something simple like an alert:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function trigger(id)
{
document.getElementById(id).onclick();
}
</script>
</head>
<body>
<input type="button" onclick="trigger('z')" name="first" value="first">
<input type="button" id="z" onclick="alert('zzzz')" name="second" value="second">
</body>
</html>
If button z's event is more complex, trigger() may need to be more complex.
Bookmarks