Hello Guys & Gals,
Here's my basic HTML code right now:
<html>
<script Language="JavaScript">
<!--
function changeHeading() {
if (document.forms[0].maptype.value == "1" {
// Column Headings Should Be
// Start Position
// End Position
}
if (document.forms[0].maptype.value == "2" {
// Column Headings Should Be
// Field Number
// Delimiter
}
}
//-->
</script>
<body>
<form>
<select name="maptype" onChange="changeHeading();">
<option selected value="1">Fixed Width</option>
<option value="2">Delimited</option>
</select><br><br>
<table width="100">
<tr>
<td width="50">Start Position</td>
<td width="50">End Position</td>
</tr>
<tr>
<td width="50"><input type="text" name="T1"></td>
<td width="50"><input type="text" name="B1"></td>
</tr>
<tr>
<td width="50"><input type="text" name="T2"></td>
<td width="50"><input type="text" name="B2"></td>
</tr>
</table>
</form>
</body>
</html>
I want that JavaScript function, which fires when the select list changes, to change the column headings in the table. Don't read into the names of the column headings thinking that I'm looking for some kind of variable. I just want to change the HTML text. I'm a newbie to Dynamic HTML. Is there an easy way to do this ??
Any help would be greatly appreciated.
ToddWW
Here's my basic HTML code right now:
<html>
<script Language="JavaScript">
<!--
function changeHeading() {
if (document.forms[0].maptype.value == "1" {
// Column Headings Should Be
// Start Position
// End Position
}
if (document.forms[0].maptype.value == "2" {
// Column Headings Should Be
// Field Number
// Delimiter
}
}
//-->
</script>
<body>
<form>
<select name="maptype" onChange="changeHeading();">
<option selected value="1">Fixed Width</option>
<option value="2">Delimited</option>
</select><br><br>
<table width="100">
<tr>
<td width="50">Start Position</td>
<td width="50">End Position</td>
</tr>
<tr>
<td width="50"><input type="text" name="T1"></td>
<td width="50"><input type="text" name="B1"></td>
</tr>
<tr>
<td width="50"><input type="text" name="T2"></td>
<td width="50"><input type="text" name="B2"></td>
</tr>
</table>
</form>
</body>
</html>
I want that JavaScript function, which fires when the select list changes, to change the column headings in the table. Don't read into the names of the column headings thinking that I'm looking for some kind of variable. I just want to change the HTML text. I'm a newbie to Dynamic HTML. Is there an easy way to do this ??
Any help would be greatly appreciated.
ToddWW