Re: Javascript problem with checkboxes
by "Adrian Murphy" <adrian.murphy(at)eudos.com>
|
Date: |
Mon, 6 Nov 2000 16:04:06 -0000 |
To: |
"Rajnish Bhaskar" <r.bhaskar(at)compserv.gla.ac.uk>, <hwg-languages(at)hwg.org> |
References: |
ac |
|
todo: View
Thread,
Original
|
|
hey,
i think your problem has to do with using numbers as names in your form.
try changing the names from e.g name = "7" to something like
name = x7.
then your loop should work like this:
function clearBoxes(start,end)
{
var i;
for (i=start; i<=end; ++i)
{
document.QuestionnaireOne["x" + i].checked = false;
} // end loop
} // end
hopefully this works.
good luck
adrian.
----- Original Message -----
From: Rajnish Bhaskar <r.bhaskar(at)compserv.gla.ac.uk>
To: <hwg-languages(at)hwg.org>
Sent: Monday, November 06, 2000 11:26 AM
Subject: Javascript problem with checkboxes
> Hi all,
> Could someone hop along to
> http://130.209.20.99/ITEU/html/questionnaires/qonetest.html and
> look at the javascript in the header and tell me what's wrong with it.
> What this is supposed to do is demonstrated in question 6 of the
> questionnaire. This is a radiobutton with options yes and no. If no
> is selected, I want the following checkboxes (which are named
> numerically) to be cleared, and this is what the clearBoxes()
> function should do -- but it doesn't :(. Could someone please tell
> me what I'm doing wrong?
>
> Thanks,
> Raj.
>
> --------------------------
> Rajnish Bhaskar
> r.bhaskar(at)compserv.gla.ac.uk, http://i.am/rajy
> IT Education Unit, University of Glasgow
> http://www.iteu.gla.ac.uk/
> --
> Happiness, Happiness,
> The greatest gift that I possess,
> I thank the Lord that I've been blessed,
> With more than my share of happiness.
>
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA