Click to See Complete Forum and Search --> : Couple of things..


Fraternal
06-20-2004, 12:19 AM
What can do I use to get it so that click on the text associated with the radio button, will check that button?

And I need to know what form I use...

If, say I have to enter ten lines in a field, 1,2,3 etc. What I want to do is click a button, and text gets inserted into that field, the text being:
1
2
3
4 etc

Fang
06-20-2004, 02:52 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>Form stuff</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
//<![CDATA[
<!--
function FillTextarea() {
for(var i=1; i<=10; i++) {
document.myform.textarea1.value+=i+"\n";
}
}
//-->
//]]>
</script>
</head>
<body>
<form action="#" name="myform">
<label for="check1">Check me:<input id="check1" type="checkbox" /></label>
<button type="button" onclick="FillTextarea();">Fill textarea</button>
<textarea rows="10" cols="25" name="textarea1"></textarea>
</form>
</body>
</html>