Click to See Complete Forum and Search --> : Refresh & Textbox Appear


Jick
08-10-2003, 08:41 PM
I posted this question in the DHTML forum:
I need a script which will allow me to make a textbox apear when someone selects a certain radio button on a form. I will have three radio buttons in a form and selecting the right one will make a textbox apear right next to it! I would like to do this without JavaScript if possible since 18% of users have JavaScript disabled on their browsers. This birthday boy would greatly appreciate any help. Thanks. :DPyro told me that you could do it with PHP by just having it refresh the page. Does any body know how to do this? Could someone provide some code? This birthday boy would appreciate it! Thanks. :D

pyro
08-10-2003, 09:40 PM
Try something like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Show/Hide Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form action="">
<p><input type="radio" name="one">
<input type="radio" name="two">
<input type="radio" name="three">
<?PHP
if (isset($_GET["show"])) {
echo "<textarea></textarea>";
}
?>
</p>
</form>
<p><a href="<?PHP echo $_SERVER["PHP_SELF"]."?show=yes"; ?>">reload</a></p>
</body>
</html>