Hello everyone,
I'm very new at javascript and have run into smething I cannot solve. I've looked over many other postings on this site, they are all very interesting and helpful but none address my partricular situation:
I have a series of checkboxes on my web page in a table. 4 checkboxes per table <TD> separated by <BR>'s. The last item in the <TD> is a type=button and an onclick=EightAM_OnClick() event. The four checkboxes represent the hour 8am in fifteen minute increments (08:00, 08:15, 08:30, 08:45). What I would like the user to do is either select individual checkboxes(no problem) or click the button at the bottom and check all the checkboxes for this hour or uncheck them(problem).
I have no real code to show you as I'm looking for your help with this. The checkboxes each have unique names. Just as a test what I've tried using:
<script type="text/javascript">
function EightAM_OnClick()
{
checkbox1.setchecked = (1)
}
</script>
The above is just a test to see if I can actually set the checkbox to 'checked' which I haven't been able to do yet.
(I know, I know not very complicated)
The HTML and ASP looks like this (the button that calls the function is at the bottom in the input tag type=button):
<TD width=60>
<INPUT type="checkbox" name="checkbox1" <%if Request.Form("checkbox1")="on" then Response.Write "Checked" end if%>><font size=2>08:00a</font>
<BR>
<INPUT type="checkbox" name="checkbox7" <%if Request.Form("checkbox7")="on" then Response.Write "Checked" end if%>><font size=2>08:15a</font>
<BR>
<INPUT type="checkbox" name=checkbox13 <%if Request.Form("checkbox13")="on" then Response.Write "Checked" end if%>><font size=2>08:30a</font>
<BR>
<INPUT type="checkbox" name=checkbox19 <%if Request.Form("checkbox19")="on" then Response.Write "Checked" end if%>><font size=2>08:45a</font>
<BR>
<INPUT type="button" value="8am" id=8am name=8am style="WIDTH: 61px; HEIGHT: 24px" size=31 onclick="EightAM_OnClick()">
</TD>
This is all developmental testing at this point.
Any help is very much appreciated...
I'm very new at javascript and have run into smething I cannot solve. I've looked over many other postings on this site, they are all very interesting and helpful but none address my partricular situation:
I have a series of checkboxes on my web page in a table. 4 checkboxes per table <TD> separated by <BR>'s. The last item in the <TD> is a type=button and an onclick=EightAM_OnClick() event. The four checkboxes represent the hour 8am in fifteen minute increments (08:00, 08:15, 08:30, 08:45). What I would like the user to do is either select individual checkboxes(no problem) or click the button at the bottom and check all the checkboxes for this hour or uncheck them(problem).
I have no real code to show you as I'm looking for your help with this. The checkboxes each have unique names. Just as a test what I've tried using:
<script type="text/javascript">
function EightAM_OnClick()
{
checkbox1.setchecked = (1)
}
</script>
The above is just a test to see if I can actually set the checkbox to 'checked' which I haven't been able to do yet.
(I know, I know not very complicated)
The HTML and ASP looks like this (the button that calls the function is at the bottom in the input tag type=button):
<TD width=60>
<INPUT type="checkbox" name="checkbox1" <%if Request.Form("checkbox1")="on" then Response.Write "Checked" end if%>><font size=2>08:00a</font>
<BR>
<INPUT type="checkbox" name="checkbox7" <%if Request.Form("checkbox7")="on" then Response.Write "Checked" end if%>><font size=2>08:15a</font>
<BR>
<INPUT type="checkbox" name=checkbox13 <%if Request.Form("checkbox13")="on" then Response.Write "Checked" end if%>><font size=2>08:30a</font>
<BR>
<INPUT type="checkbox" name=checkbox19 <%if Request.Form("checkbox19")="on" then Response.Write "Checked" end if%>><font size=2>08:45a</font>
<BR>
<INPUT type="button" value="8am" id=8am name=8am style="WIDTH: 61px; HEIGHT: 24px" size=31 onclick="EightAM_OnClick()">
</TD>
This is all developmental testing at this point.
Any help is very much appreciated...