/    Sign up×
Community /Pin to ProfileBookmark

Refresh & Textbox Appear

I posted this question in the DHTML forum:

[QUOTE]

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. ?

[/QUOTE]

Pyro 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. ?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@pyroAug 11.2003 — Try something like this:

[code=php]<!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>[/code]
×

Success!

Help @Jick spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...