sorry, changed my mind in how to do it half way through typing and forgot to change the initial writing. what I did was pass the action url to the function
so now that I have this straight in my head
![[lol] [lol] [lol]](/data/assets/smilies/lol.gif)
the button will look like this
<input type="button" value="Some Value" onClick="actionEquals('action1')"><br>
then the function takes the paramter passed and concatinates the ext. to it as you see here.
<script language="javascript">
function actionEquals(str) {
str += ".htm"
document.frm.action == str
frm.submit();
}
</script>
you don't need to name the buttons at all. decided that was a sloppy way to do it. so the entire thing looks as this
<script language="javascript">
function actionEquals(str) {
str += ".htm"
document.frm.action == str
frm.submit();
}
</script>
</head>
<body>
<form name="frm" method="post">
<input type="Hidden" name="hidden1" value="value1">
<input type="Hidden" name="hidden2" value="value2">
<input type="Hidden" name="hidden3" value="value3">
<input type="button" value="Some Value" onClick="actionEquals('action1')"><br>
<input type="button" value="Some Value" onClick="actionEquals('action2')"><br>
<input type="button" value="Some Value" onClick="actionEquals('action3')"><br>
</form>
---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee"

;alert(Nstr); }
---------------------------------------
for the best results to your questions: FAQ333-2924