how do i generate hyperlink, partially using textbox(html)?
this is what i need:
a textbox, with a submit button; when the button is pressed it wil link to a site like:
www.computing.net
but the textbox has to add something to the link:
textbox=i_need_help
link= www.computing.net/i_need_help.htm
Have you tried something like?
(beware: untested code, will need tweaking)<head>
<script language="javascript">
function goToUrl()
{
var textbox = document.getElementById("myTextBoxId");
var url = "http://www.computing.net/";
if (textbox != null && textbox != "undefined" && textbox.value != null && textbox.value.length > 0)
{
url = url + textbox.value;
}
window.location = url;
}
</script>
</head><body>
< a href="javascript:goToUrl()">Go!</a>
</body>hth
Elinor Hurst
http://elinorhurst.blogspot.com
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |