...

View Full Version : How do I select a text name??



alvis
10-19-2005, 11:37 PM
I want to select the text put into a textbox. I seem to keep getting it wrong what is my problem??

<html>
<head>
<title>
</title>

<script type="text/javascript">


function function1()

{
document.write("Welcome "+text)
}

</script>

</head>

<body>

<form onsubmit="function1()">
<input type="text" name="text" id="text" value="Enter Name">
<input type="submit" value="Send">
</form>


</body>

</html>


Thanks guys

Philip M
10-20-2005, 09:28 AM
<html>
<head>
<title>
</title>

<script type="text/javascript">
function function1(which)
{
document.write("Welcome "+ which.value)
}
</script>

</head>

<body>

<form onsubmit="function1(text)">
<input type="text" name="txt" id="text" value="Enter Name">
<input type="submit" value="Send">
</form>

</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum