Hi,
I've had a go at using the code provided by _Aerospace_Eng_ :
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script type="text/javascript">
function goTo()
{
window.location = 'index' + document.forms[0].where.value + '.htm';
return false;
}
</script>
</head>
<body>
<form action="" method="post" onsubmit="return goTo()">
<input type="text" name="where" value="Enter page number" onfocus="if(this.value == this.defaultValue) this.value = '';" onblur="if(this.value == '') this.value = this.defaultValue;">
<input type="submit" value="Go">
</form>
</body>
</html>
It's working well for its original purpose but I could really do with the ability to alter it so I can redirect users to a different root url. If i install the code on a page with the url:
www.abc.com/code
and then enter the number 5 into the form field and press submit, the url which is returned is:
www.abc.com/code/5
I could do with the ability to redirect people to the root url as follows:
www.abc.com/5
or an alternative domain name if possible.
I'd be really grateful if you could find the time to suggest how I can edit the original code to achieve the above. A couple of hours of experimentation on my part has failed to provide a solution!
Thanks very much in anticipation of your help.