I can not figure out how to link this go button to my list so that when I select a font name in the list and click go the font within the textarea will change and its size, any help?
code:
<script language="JavaScript1.2" type="text/javascript">
function ChangeFontFamily(id, family) {
document.getElementById(id).style.fontFamily = family;
}
function ChangeFontSize(id, size) {
document.getElementById(id).style.fontSize = size + "px";
}
</script>
</head>
<body>
<center><form>
<textarea width=200 height=200 id="lyr"></textarea><div>
<select name="list">
<option onclick="ChangeFontFamily('lyr','Times New Roman');ChangeFontSize('lyr','12')">Time
<option onclick="ChangeFontFamily('lyr','Arial');ChangeFontSize('lyr','12')">Arial
<option onclick="ChangeFontFamily('lyr','Jokerman');ChangeFontSize('lyr','12')">Jokerman
</select>
<INPUT TYPE=BUTTON VALUE=http://www.webdeveloper.com/forum/archive/index.php/"GO"> (link this with TA above)
</form>
any help would be great!!!
thanks in advance
Code One
code:
<script language="JavaScript1.2" type="text/javascript">
function ChangeFontFamily(id, family) {
document.getElementById(id).style.fontFamily = family;
}
function ChangeFontSize(id, size) {
document.getElementById(id).style.fontSize = size + "px";
}
</script>
</head>
<body>
<center><form>
<textarea width=200 height=200 id="lyr"></textarea><div>
<select name="list">
<option onclick="ChangeFontFamily('lyr','Times New Roman');ChangeFontSize('lyr','12')">Time
<option onclick="ChangeFontFamily('lyr','Arial');ChangeFontSize('lyr','12')">Arial
<option onclick="ChangeFontFamily('lyr','Jokerman');ChangeFontSize('lyr','12')">Jokerman
</select>
<INPUT TYPE=BUTTON VALUE=http://www.webdeveloper.com/forum/archive/index.php/"GO"> (link this with TA above)
</form>
any help would be great!!!
thanks in advance
Code One