Теперь всё норм работает:
<html>
<head>
<script language="JavaScript">
<!-- hide
function getFileName()
{
var s1 = document.getElementById('inp1').value;
var s2 = document.getElementById('inp2').value;
var s = "http://test.ru/" + s1 + s2 + ".txt";
location.href = s;
}
// -->
</script>
</head>
<body>
<form>
<input type="text" id="inp1" name="inp1" style="width: 80px; height: 20px;" />
<input type="text" id="inp2" name="inp2" style="width: 80px; height: 20px;" />
<input type="button" value="ok" onclick="getFileName();">
</form>
</body>
</html>
UPD:
Kolyaj, не увидел.