You misunderstood me again. I've rewritten the code isolated in a new html
doc and tested it. It still does not work, so either the variables are not
passing, or I do not understand how to reference the variable once it's been
passed. I comented out the 2nd method of capturing the variables as the
first responder to this post suggested, but it still didn't work.
<html>
<head>
<script type="text/javascript">
function radioenable(y,z) {
document.forms.search.elements.y.disabled=false;
//document.forms.search.elements[y].disabled=false;
document.forms.search.elements.z.disabled=true;
//document.forms.search.elements[z].disabled=true;
}
</script>
</head>
<body>
<form name="search" action="list.php" method="post">
<input type="radio" name="datetype" value="spdate"
onclick="radioenable(timestamp,rangdates);"checked ><b>Specific Date</b>
<br>
<input type="text" name="timestamp">
<br><br>
<input type="radio" name="datetype" value="rangdate"
onclick="radioenable(rangdates,timestamp);"><b>Ran ge of Dates</b>
<br>
<select style="background-color:#EEE;width:90;" name="rangdates">
<option value=\"1d\">Past 2 days</option>
<option value=\"3d\">Past 5 days</option>
<option value=\"5d\">Past week</option>
</select>
</form>
//Disable drop down box as soon as page is loaded
<script
type="text/javascript">document.forms.search.elements.rangdat es.disabled=true;</script>
</body>
</html>
Thanks,
Max
"Zoe Brown" <zo***********@N-O-S-P-A-A-Mtesco.net> wrote in message
news:%k****************@newsfe1-gui.ntli.net...
"Max" <ma*@max.com> wrote in message
news:Zg********************@fe04.news.easynews.com ...I guess I made a mistake by not posting what I'm trying to do.
I have two radio buttons, a text input box, and a drop down select box.
eh ?? a radio botton is a small circle that you can select or not, it is
NOT a text input box or a select box.
When the page is loaded, the text box is enabled the drop down box
element is disabled (via javascript).
What I'm trying to do is when the 2nd radio is clicked, the input box is
disabled and the drop down box is enabled, then if the first radio is
clicked, the opposite.
It all works fine with javascript inline, or if I create to separate
javascript functions and don't try to pass any variables.
Post the code please.