If you use PHP, ASP, or Perl you will need a CGI host that supports this.
If you use JavaScript it will run anywhere a HTML file can be run including free hosting.
The only reason to use a CGI is to access a database or some other file storage data. Mind you if you need to save the results in JavaScript you can always send the data to an e-mail address
To do waht you vant in JS you would need to hold a list of names in an array then when the user clicks the button pick a random number and show that name. Unlike CGI Java script won't need to launch a new page it can do it all client side on the same window and is much more efficient.
something like..
<HTML>
<HEAD>
<SCRIPT LANGUAGE = "JavaScript">
<!--HIDE
function namePicker()
{
var names = new Array("fred","bill","frodo")
myRnd = Math.floor(rnd % (0 - 2))
this.form.setName.value = names[myRnd]
}
//-->STOP HIDING-->
</SCRIPT><HEAD>
<BODY>
<FORM>
<INPUT TYPE="text" NAME="setName"><br><br>
<INPUT TYPE="button" VAULE="Click for a New Name" onClick="namePicker()">
</FORM>
</BODY>
</HTML>
That was out my head so it might need some debugging to work but I'd recommend this book if you need to learn: JavaScript for the World Wide Web (Visual Quickstart Guide) Ted Gesing, Jeremy Shneider
it rocks!
http://www.KumKie.com http://bulldog.servegame.com