Form value creates a URL

<script>
    function process()
    {
        var url = "http://name.com/" + document.getElementById("url").value;
        location.href = url;
        return false;
    }
</script>

<form onSubmit="return process();">
    URL: <input type="text" name="url" id="url">
    <input type="submit" value="go">
</form>

You can add onsubmit="this.action='http://google.com/'+this.fieldName.value;" to your tag.


This should do it:

<script type="text/javascript">
    function goToPage() {
        var page = document.getElementById('page').value;
        window.location = "http://name.com/" + page;
    }
</script>
<input type="text" id="page" />
<input type="submit" value="submit" onclick="goToPage();" />

Tags:

Html

Forms

Url