Forum Moderators: open
Please go to "healthone.jp" and play with the select menus in the center of the page. Then please have a look at how I have it coded.
My undersatnding of JS is very low-level.
<html>
<head>
<title>Untitled</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="style.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/JavaScript">
<!--
function trapSpecial() {
var tmp = document.AgeRange.AgeRange;
var tmp2 = document.Deductible.Deductible;
.... cut ....
}
//-->
</script>
</head>
<body style="background-image:url(images/bg.gif); background-repeat:repeat-x" >
<table cellpadding="0" cellspacing="0" border="0" align="center" >
<tr>
.... cut ......
<img src="images/quote.gif" style="margin-bottom:11px" alt="" border="0"><br>
<script language="javascript" type="text/JavaScript">
<!--
function trapSpecial() {
var tmp = document.AgeRange.AgeRange;
var tmp2 = document.Deductible.Deductible;
if ( tmp[tmp.selectedIndex].value == "1" )
..... cut ........
}
//-->
</script>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="20%">
Select Age Range:</td><td>
<form name="AgeRange" method="post">
<select name="AgeRange" onChange="trapSpecial();">
<option value="0">Select</option>
.....cut .......
p.s.
Recommend reviewing <title> tag contents. Very important for google and other seach engines.
Thanks for this, it was very helpful. I did what you suggested. May I ask just a couple more questions?
Can you tell me if the code as it is now (per your instructions) is fairly compatible with various browsers? Something strange happen when I look at the select boxes in IE 5.5 for Mac. I see the word select, but in the lower select box, I do not see any text below the word select. If you select something, then it shows.
Also, in my body code, I have:
<form name="AgeRange" method="post">
Is method="post" correct? Should I be using something else?