Forum Moderators: open
I need to create a URL when a user enters a string into a text field. When the form is submitted, I'd like an alert to pop up with the full URL in it. The URL would be like follows:
[domain.com...]
Is this possible? I have a list of URL's I need to do this for....
Thanks for any help!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title> New Document </title>
</head>
<body><form action="http://www.google.com" method="post" onsubmit="alertUser(document.getElementById('txtString').value);">
<fieldset>
<legend>Url Form</legend><label>String</label>
<input type="text" id="txtString">
<input type="submit"></fieldset>
</form><script type="text/javascript">
function alertUser(theValue){
alert('http://www.domain.com/'+theValue);
}
</script></body>
</html>