[thelist] js/css show div based on onchange
Courtenay
court3nay at gmail.com
Thu Oct 21 02:11:28 CDT 2004
What about simplifying a little? Remember, if they have Javascript
turned off, (a contentious issue, to be sure, but one you need to
think about) then the page won't work.
<select>
<select name="internet_type">
<option value=""></option>
<option value="CABLE">CABLE</option>
<option value="DSL_R">DSL - with router</option>
<option value="DSL_N">DSL - no router </option>
. . .
Otherwise, if you MUST do it the other way :) read that excellent
article. There are quick-n-nastier ways of doing it, if you're
interested.
if you want to keep your own code there, for starters, change
document.dslarea
to
document.getElementById('dslarea'),
(and do some object detection, too!)
and change that loooong
if (document.frmdefault.internet_type.value ==
to
if (this.value ==
Let me know if you want more..
More information about the thelist
mailing list