bigkga
08-03-2008, 11:35 PM
This is what I have done. Now my question is that I have the friend one working but cannot get a repeat with another question which has another question and has a second box that needs to come up. How do i achieve this.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--
function SelectCng(sel,id){
document.getElementById(id).style.display=sel.selectedIndex==3?'':'none';
}
//-->
</script></head>
<body>
<form>
<table border="1">
<tr>
<td>Your Name </td><td><input type="text" name="Name" /></td></tr>
<tr>
<td>Email Address</td><td><input type="text" name="Email" /></td></tr>
<tr>
<td>First Time Here?</td><td><select size="1" name="First">
<option value="No">No</option>
<option value="Yes">Yes</option>
</select>
</td>
</tr>
<tr>
<td>
How did you find us?
</td>
<td>
<select size="1" name="Found_by" onchange="SelectCng(this,'Friend');" >
<option value="Newspaper">Newspaper</option>
<option value="Search Engine">Search Engine</option>
<option value="Flyer">Flyer</option>
<option value="Friend">Friend</option>
</select>
</td>
</tr>
<tr id="Friend" style="display:none;" >
<td>
Friends Name
</td>
<td>
<input name="FriendName">
</td>
</tr>
</form>
</table>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--
function SelectCng(sel,id){
document.getElementById(id).style.display=sel.selectedIndex==3?'':'none';
}
//-->
</script></head>
<body>
<form>
<table border="1">
<tr>
<td>Your Name </td><td><input type="text" name="Name" /></td></tr>
<tr>
<td>Email Address</td><td><input type="text" name="Email" /></td></tr>
<tr>
<td>First Time Here?</td><td><select size="1" name="First">
<option value="No">No</option>
<option value="Yes">Yes</option>
</select>
</td>
</tr>
<tr>
<td>
How did you find us?
</td>
<td>
<select size="1" name="Found_by" onchange="SelectCng(this,'Friend');" >
<option value="Newspaper">Newspaper</option>
<option value="Search Engine">Search Engine</option>
<option value="Flyer">Flyer</option>
<option value="Friend">Friend</option>
</select>
</td>
</tr>
<tr id="Friend" style="display:none;" >
<td>
Friends Name
</td>
<td>
<input name="FriendName">
</td>
</tr>
</form>
</table>
</body>
</html>