The problem with your code is:
When you click the 'Dark' button, the JavaScript is called but the form and the other elements are not available at that time. So it gives an error:
document.f.box1 is null or not an object.
To make this code working, move if request("test")... part to below dark button declaration.
I am giving you the working code below:
<html>
<script language="javascript" type="text/javascript">
function putText(s) {
alert(s);
document.f.box1.value = s;
document.f.submit();
}
</script>
<%
box1 = request.form("box1")
if box1 = "" then
box1 = "The sky is blue today"
end if
%>
<body>
<form name="f" id="f" method="post">
<input name="box1" id="box1" type="text" value="<%=box1%>" >
<input type="submit" value="Pink" onClick="putText('Click to Pink Sky')" >
<input name="test" id="test" type="submit" value="Dark" >
<%
if request.form("test") = "Dark" then
response.Write("<script>putText('Submit to get dark sky')</script>")
end if
%>
</form>
</body>
</html>
Hope this solves the problem and clears your doubt.
[Edit]
And you don't even need to submit the form twice in the JavaScript function. So remove document.f.submit(); from the function.
[/Edit]