PDA

View Full Version : dynamic url's


usedtextbook
08-15-2002, 02:24 AM
Also, I want to be able to make a unique URL based on a user's input.

For exmple you type in "47832942" and then click on submit so they get sent to a new page with a URL hyperlink to www.usedtextbook.com/ goodbye47832942hello.htm

Thanks in advance for your time!

adios
08-15-2002, 03:05 AM
<html>
<head>
<title>untitled</title>
<script type="text/javascript" language="javascript">

function buildURL(f) {
var startURL = 'www.usedtextbook.com/goodbye';
var midURL = f.midURL.value;
var endURL = 'hello.htm';
return startURL + midURL + endURL;
}

</script>
</head>
<body>
<form onsubmit="this.action=buildURL(this)">
<input type="text" name="midURL"><br>
<input type="submit">
</form>
</body>
</html>