"Poko" <po**@shaw.ca> wrote in message
news:q4U6f.282912$tl2.154376@pd7tw3no...
Hi all
Was wondering if someone could show me how I can use javascript to submit
a form using three separate buttons that would cause the forms action="" to
hold different values?
Poko
Will this help? Watch for word-wrap.
<html>
<head>
<title>3actions.htm</title>
<script type="text/javascript">
function submits(what) {
document.form1.action += "?" + what;
document.form1.submit();
}
</script>
</head>
<body>
<form action="3actions.htm" method="post" name="form1">
<input type="button" value="1" onclick="submits(1)">
<input type="button" value="2" onclick="submits(2)">
<input type="button" value="3" onclick="submits(3)">
</form>
</body>
</html>