Checking that at least one check box is checked

  • Thread starter Thread starter Russell
  • Start date Start date
TY Kathleen

But that script proved too complicated for me. I was able to get it to do
what I wanted in its "own" page but upon pasting into my page it did not
work .

I pasted this:

<script Language="JavaScript">
<!--
function checkbox_checker()
{

// set var checkbox_choices to zero

var checkbox_choices = 0;

// Loop from zero to the one minus the number of checkbox button selections
for (counter = 0; counter < checkbox_form.checkbox.length; counter++)
{

// If a checkbox has been selected it will return true
// (If not it will return false)
if (checkbox_form.checkbox[counter].checked)
{ checkbox_choices = checkbox_choices + 1; }

}
if (checkbox_choices < 1 )
{
// If there were less then selections made display an alert box
alert("Please make a selection.")
return (false);
}
}

-->
</script>

And this :

<FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl" onsubmit="return
checkbox_checker()" name="checkbox_form">


And get the results : checkbox_form.checkbox.length is null or not
an object.

Any other hints for me?

Thanks

Russell
 
Are all your check boxes in your form named checkbox per the sample code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able to get it to do
| what I wanted in its "own" page but upon pasting into my page it did not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button selections
| for (counter = 0; counter < checkbox_form.checkbox.length; counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl" onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length is null or not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| message | > With JavaScript: http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would like to make sure
| > > that at least one check box is checked before the submit button sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
Thanks Stefan.

I changed the names of the checkboxes and that script works fine. Problem is
my shopping cart expects the checkbox names to be multi-item1, multi-item2,
etc. I can't change those names and still have the shopping cart place a
checked item in the cart. Any suggestions?

Thanks

Russell

Stefan B Rusynko said:
Are all your check boxes in your form named checkbox per the sample code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able to get it to do
| what I wanted in its "own" page but upon pasting into my page it did not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button selections
| for (counter = 0; counter < checkbox_form.checkbox.length; counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl" onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length is null or not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| message | > With JavaScript: http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would like to make sure
| > > that at least one check box is checked before the submit button sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
Have you contact your shopping cart vendor for help with this issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Russell said:
Thanks Stefan.

I changed the names of the checkboxes and that script works fine. Problem is
my shopping cart expects the checkbox names to be multi-item1, multi-item2,
etc. I can't change those names and still have the shopping cart place a
checked item in the cart. Any suggestions?

Thanks

Russell

Stefan B Rusynko said:
Are all your check boxes in your form named checkbox per the sample code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able to get it to do
| what I wanted in its "own" page but upon pasting into my page it did not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button selections
| for (counter = 0; counter < checkbox_form.checkbox.length; counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl" onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length is null or not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| message | > With JavaScript: http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would like to make sure
| > > that at least one check box is checked before the submit button sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
No I haven' to. I don't see it as a cart issue. The cart works fine. I
would just like to prevent submission to the cart with empty check boxes.
Its not a big deal, but to some, I suspect it might be annoying.
Not really knowing JavaScript, but having seen what can be done, I didn't
think it would be too difficult to check for input before submitting the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Thomas A. Rowe said:
Have you contact your shopping cart vendor for help with this issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works fine. Problem is
my shopping cart expects the checkbox names to be multi-item1, multi-item2,
etc. I can't change those names and still have the shopping cart place a
checked item in the cart. Any suggestions?

Thanks

Russell

Stefan B Rusynko said:
Are all your check boxes in your form named checkbox per the sample code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank
Aaron said:
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able to get it
to
do
| what I wanted in its "own" page but upon pasting into my page it did not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button selections
| for (counter = 0; counter < checkbox_form.checkbox.length; counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl" onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length is null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| message | > With JavaScript: http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would like to
make
sure
| > > that at least one check box is checked before the submit button sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
It is not a FP issue either, it is a cart issue, since you must name each checkbox uniquely, the
author may have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Russell said:
No I haven' to. I don't see it as a cart issue. The cart works fine. I
would just like to prevent submission to the cart with empty check boxes.
Its not a big deal, but to some, I suspect it might be annoying.
Not really knowing JavaScript, but having seen what can be done, I didn't
think it would be too difficult to check for input before submitting the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Thomas A. Rowe said:
Have you contact your shopping cart vendor for help with this issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works fine. Problem is
my shopping cart expects the checkbox names to be multi-item1, multi-item2,
etc. I can't change those names and still have the shopping cart place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per the sample code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank
Aaron said:
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able to get it to
do
| what I wanted in its "own" page but upon pasting into my page it did not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button
selections
| for (counter = 0; counter < checkbox_form.checkbox.length; counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length is null or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| message | > With JavaScript: http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would like to make
sure
| > > that at least one check box is checked before the submit button
sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
Thanks Thomas

Thomas A. Rowe said:
It is not a FP issue either, it is a cart issue, since you must name each checkbox uniquely, the
author may have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

No I haven' to. I don't see it as a cart issue. The cart works fine. I
would just like to prevent submission to the cart with empty check boxes.
Its not a big deal, but to some, I suspect it might be annoying.
Not really knowing JavaScript, but having seen what can be done, I didn't
think it would be too difficult to check for input before submitting the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Thomas A. Rowe said:
Have you contact your shopping cart vendor for help with this issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works fine. Problem is
my shopping cart expects the checkbox names to be multi-item1, multi-item2,
etc. I can't change those names and still have the shopping cart place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per the sample code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank
Aaron said:
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able to get
it
to
do
| what I wanted in its "own" page but upon pasting into my page it
did
not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button
selections
| for (counter = 0; counter < checkbox_form.checkbox.length; counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length is
null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| "Kathleen Anderson [MVP - FrontPage]" <[email protected]>
wrote
in
| message | > With JavaScript: http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would like to make
sure
| > > that at least one check box is checked before the submit button
sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
Well the author didn't have a solution... Anyone else? All I want to do is
make sure one of 2 or 3 checkboxes is checked off. All the checkboxes must
have unique names.

Much appreciated,

Russell

Russell said:
Thanks Thomas

Thomas A. Rowe said:
It is not a FP issue either, it is a cart issue, since you must name
each
checkbox uniquely, the
author may have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

No I haven' to. I don't see it as a cart issue. The cart works fine. I
would just like to prevent submission to the cart with empty check boxes.
Its not a big deal, but to some, I suspect it might be annoying.
Not really knowing JavaScript, but having seen what can be done, I didn't
think it would be too difficult to check for input before submitting the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Have you contact your shopping cart vendor for help with this issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works fine.
Problem is
my shopping cart expects the checkbox names to be multi-item1,
multi-item2,
etc. I can't change those names and still have the shopping cart place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per the sample
code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank
Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able to get it
to
do
| what I wanted in its "own" page but upon pasting into my page it did
not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button
selections
| for (counter = 0; counter < checkbox_form.checkbox.length; counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length is null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
in
| message | > With JavaScript:
http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would like to
make
sure
| > > that at least one check box is checked before the submit button
sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
If you want to use checkboxes and check client-side you are going to have to change / duplicate the
JavaScript code to check each checkbox so that the checking function has a corresponding name for
each check box you want to have checked.

Alternatively, can you use a drop down, where you can set it so that one item has to be selected?
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Russell said:
Well the author didn't have a solution... Anyone else? All I want to do is
make sure one of 2 or 3 checkboxes is checked off. All the checkboxes must
have unique names.

Much appreciated,

Russell

Russell said:
Thanks Thomas

Thomas A. Rowe said:
It is not a FP issue either, it is a cart issue, since you must name
each
checkbox uniquely, the
author may have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

No I haven' to. I don't see it as a cart issue. The cart works fine. I
would just like to prevent submission to the cart with empty check boxes.
Its not a big deal, but to some, I suspect it might be annoying.
Not really knowing JavaScript, but having seen what can be done, I didn't
think it would be too difficult to check for input before submitting the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Have you contact your shopping cart vendor for help with this issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works fine.
Problem is
my shopping cart expects the checkbox names to be multi-item1,
multi-item2,
etc. I can't change those names and still have the shopping cart place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per the sample
code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank
Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able to get it
to
do
| what I wanted in its "own" page but upon pasting into my page it did
not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button
selections
| for (counter = 0; counter < checkbox_form.checkbox.length; counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length is null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
in
| message | > With JavaScript:
http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would like to
make
sure
| > > that at least one check box is checked before the submit button
sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
Thomas,
I would rather not use drop down boxes. So the alternative you suggested is
ok by me. I will be using it in 50 - 60 pages that all have similar choices
(1-3 checkboxes) and all the check boxes will be similarly named.

Of course I do not know how to go about doing it, so your help is, as usual
greatly appreciated.

Thanks again,

Russell

Thomas A. Rowe said:
If you want to use checkboxes and check client-side you are going to have to change / duplicate the
JavaScript code to check each checkbox so that the checking function has a corresponding name for
each check box you want to have checked.

Alternatively, can you use a drop down, where you can set it so that one item has to be selected?
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Well the author didn't have a solution... Anyone else? All I want to do is
make sure one of 2 or 3 checkboxes is checked off. All the checkboxes must
have unique names.

Much appreciated,

Russell

Russell said:
Thanks Thomas

It is not a FP issue either, it is a cart issue, since you must name each
checkbox uniquely, the
author may have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

No I haven' to. I don't see it as a cart issue. The cart works
fine.
I
would just like to prevent submission to the cart with empty check
boxes.
Its not a big deal, but to some, I suspect it might be annoying.
Not really knowing JavaScript, but having seen what can be done, I
didn't
think it would be too difficult to check for input before
submitting
the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Have you contact your shopping cart vendor for help with this issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works fine.
Problem is
my shopping cart expects the checkbox names to be multi-item1,
multi-item2,
etc. I can't change those names and still have the shopping cart
place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per the sample
code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank
Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able to get
it
to
do
| what I wanted in its "own" page but upon pasting into my page it
did
not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button
selections
| for (counter = 0; counter < checkbox_form.checkbox.length;
counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length is
null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| "Kathleen Anderson [MVP - FrontPage]"
wrote
in
| message | > With JavaScript:
http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would
like
to
make
sure
| > > that at least one check box is checked before the submit
button
sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
Ok, you will have to wait for someone that works with JavaScript more then I do to help you change
it to meet you needs.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Russell said:
Thomas,
I would rather not use drop down boxes. So the alternative you suggested is
ok by me. I will be using it in 50 - 60 pages that all have similar choices
(1-3 checkboxes) and all the check boxes will be similarly named.

Of course I do not know how to go about doing it, so your help is, as usual
greatly appreciated.

Thanks again,

Russell

Thomas A. Rowe said:
If you want to use checkboxes and check client-side you are going to have to change / duplicate the
JavaScript code to check each checkbox so that the checking function has a corresponding name for
each check box you want to have checked.

Alternatively, can you use a drop down, where you can set it so that one item has to be selected?
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Well the author didn't have a solution... Anyone else? All I want to do is
make sure one of 2 or 3 checkboxes is checked off. All the checkboxes must
have unique names.

Much appreciated,

Russell

Thanks Thomas

It is not a FP issue either, it is a cart issue, since you must name
each
checkbox uniquely, the
author may have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

No I haven' to. I don't see it as a cart issue. The cart works fine.
I
would just like to prevent submission to the cart with empty check
boxes.
Its not a big deal, but to some, I suspect it might be annoying.
Not really knowing JavaScript, but having seen what can be done, I
didn't
think it would be too difficult to check for input before submitting
the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Have you contact your shopping cart vendor for help with this issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works fine.
Problem is
my shopping cart expects the checkbox names to be multi-item1,
multi-item2,
etc. I can't change those names and still have the shopping cart
place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per the
sample
code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank
Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able to get
it
to
do
| what I wanted in its "own" page but upon pasting into my page it
did
not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button
selections
| for (counter = 0; counter < checkbox_form.checkbox.length;
counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length is
null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| "Kathleen Anderson [MVP - FrontPage]"
wrote
in
| message | > With JavaScript:
http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would like
to
make
sure
| > > that at least one check box is checked before the submit
button
sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
I do appreciate your efforts.

Thank you.


Thomas A. Rowe said:
Ok, you will have to wait for someone that works with JavaScript more then I do to help you change
it to meet you needs.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thomas,
I would rather not use drop down boxes. So the alternative you suggested is
ok by me. I will be using it in 50 - 60 pages that all have similar choices
(1-3 checkboxes) and all the check boxes will be similarly named.

Of course I do not know how to go about doing it, so your help is, as usual
greatly appreciated.

Thanks again,

Russell

Thomas A. Rowe said:
If you want to use checkboxes and check client-side you are going to
have
to change / duplicate the
JavaScript code to check each checkbox so that the checking function
has a
corresponding name for
each check box you want to have checked.

Alternatively, can you use a drop down, where you can set it so that
one
item has to be selected?
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Well the author didn't have a solution... Anyone else? All I want to
do
is
make sure one of 2 or 3 checkboxes is checked off. All the checkboxes must
have unique names.

Much appreciated,

Russell

Thanks Thomas

It is not a FP issue either, it is a cart issue, since you must name
each
checkbox uniquely, the
author may have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

No I haven' to. I don't see it as a cart issue. The cart works fine.
I
would just like to prevent submission to the cart with empty check
boxes.
Its not a big deal, but to some, I suspect it might be annoying.
Not really knowing JavaScript, but having seen what can be done, I
didn't
think it would be too difficult to check for input before submitting
the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Have you contact your shopping cart vendor for help with this issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works fine.
Problem is
my shopping cart expects the checkbox names to be multi-item1,
multi-item2,
etc. I can't change those names and still have the shopping cart
place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per the
sample
code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank
Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able
to
get
it
to
do
| what I wanted in its "own" page but upon pasting into my
page
it
did
not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox button
selections
| for (counter = 0; counter < checkbox_form.checkbox.length;
counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an
alert
box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results :
checkbox_form.checkbox.length
is
null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| "Kathleen Anderson [MVP - FrontPage]"
wrote
in
| message | > With JavaScript:
http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would like
to
make
sure
| > > that at least one check box is checked before the submit
button
sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > > http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
Is this thread done ? Should I repost?

Russell

Russell said:
I do appreciate your efforts.

Thank you.


Thomas A. Rowe said:
Ok, you will have to wait for someone that works with JavaScript more
then
I do to help you change
it to meet you needs.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
suggested
to
done,
I
didn't
think it would be too difficult to check for input before
submitting
the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Have you contact your shopping cart vendor for help with this
issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works
fine.
Problem is
my shopping cart expects the checkbox names to be multi-item1,
multi-item2,
etc. I can't change those names and still have the shopping cart
place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per the
sample
code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank
Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:


http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was
able
to
get
it
to
do
| what I wanted in its "own" page but upon pasting into my page
it
did
not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox
button
selections
| for (counter = 0; counter < checkbox_form.checkbox.length;
counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert
box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length
is
null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| "Kathleen Anderson [MVP - FrontPage]"
<[email protected]>
wrote
in
| message | > With JavaScript:
http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would
like
to
make
sure
| > > that at least one check box is checked before the submit
button
sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > >
http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
I wait a few more days.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Russell said:
Is this thread done ? Should I repost?

Russell

Russell said:
I do appreciate your efforts.

Thank you.


Thomas A. Rowe said:
Ok, you will have to wait for someone that works with JavaScript more
then
I do to help you change
it to meet you needs.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thomas,
I would rather not use drop down boxes. So the alternative you
suggested
is
ok by me. I will be using it in 50 - 60 pages that all have similar choices
(1-3 checkboxes) and all the check boxes will be similarly named.

Of course I do not know how to go about doing it, so your help is, as usual
greatly appreciated.

Thanks again,

Russell

If you want to use checkboxes and check client-side you are going to have
to change / duplicate the
JavaScript code to check each checkbox so that the checking function has a
corresponding name for
each check box you want to have checked.

Alternatively, can you use a drop down, where you can set it so that one
item has to be selected?
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Well the author didn't have a solution... Anyone else? All I want
to
do
is
make sure one of 2 or 3 checkboxes is checked off. All the checkboxes
must
have unique names.

Much appreciated,

Russell

Thanks Thomas

It is not a FP issue either, it is a cart issue, since you must name
each
checkbox uniquely, the
author may have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

No I haven' to. I don't see it as a cart issue. The cart works
fine.
I
would just like to prevent submission to the cart with empty check
boxes.
Its not a big deal, but to some, I suspect it might be annoying.
Not really knowing JavaScript, but having seen what can be
done,
I
didn't
think it would be too difficult to check for input before
submitting
the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Have you contact your shopping cart vendor for help with this
issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works
fine.
Problem is
my shopping cart expects the checkbox names to be multi-item1,
multi-item2,
etc. I can't change those names and still have the shopping cart
place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per the
sample
code
<input type="checkbox" value="Hank Aaron" name="checkbox">Hank
Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:


http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was
able
to
get
it
to
do
| what I wanted in its "own" page but upon pasting into my page
it
did
not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox
button
selections
| for (counter = 0; counter < checkbox_form.checkbox.length;
counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an alert
box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results : checkbox_form.checkbox.length
is
null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| "Kathleen Anderson [MVP - FrontPage]"
<[email protected]>
wrote
in
| message | > With JavaScript:
http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would
like
to
make
sure
| > > that at least one check box is checked before the submit
button
sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > >
http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
I would wait a few more days, to see if any one can help you modify the script from:
http://www.codeave.com/javascript/code.asp?u_log=7062
to work with your uniquely named checkboxes.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thomas A. Rowe said:
I wait a few more days.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Russell said:
Is this thread done ? Should I repost?

Russell

Russell said:
I do appreciate your efforts.

Thank you.


Ok, you will have to wait for someone that works with JavaScript more then
I do to help you change
it to meet you needs.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thomas,
I would rather not use drop down boxes. So the alternative you suggested
is
ok by me. I will be using it in 50 - 60 pages that all have similar
choices
(1-3 checkboxes) and all the check boxes will be similarly named.

Of course I do not know how to go about doing it, so your help is, as
usual
greatly appreciated.

Thanks again,

Russell

If you want to use checkboxes and check client-side you are going to
have
to change / duplicate the
JavaScript code to check each checkbox so that the checking function
has a
corresponding name for
each check box you want to have checked.

Alternatively, can you use a drop down, where you can set it so that
one
item has to be selected?
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Well the author didn't have a solution... Anyone else? All I want to
do
is
make sure one of 2 or 3 checkboxes is checked off. All the checkboxes
must
have unique names.

Much appreciated,

Russell

Thanks Thomas

It is not a FP issue either, it is a cart issue, since you must
name
each
checkbox uniquely, the
author may have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

No I haven' to. I don't see it as a cart issue. The cart works
fine.
I
would just like to prevent submission to the cart with empty
check
boxes.
Its not a big deal, but to some, I suspect it might be annoying.
Not really knowing JavaScript, but having seen what can be done,
I
didn't
think it would be too difficult to check for input before
submitting
the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Have you contact your shopping cart vendor for help with this
issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works
fine.
Problem is
my shopping cart expects the checkbox names to be
multi-item1,
multi-item2,
etc. I can't change those names and still have the shopping
cart
place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per the
sample
code
<input type="checkbox" value="Hank Aaron"
name="checkbox">Hank
Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:


http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was able
to
get
it
to
do
| what I wanted in its "own" page but upon pasting into my
page
it
did
not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of checkbox
button
selections
| for (counter = 0; counter < checkbox_form.checkbox.length;
counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an
alert
box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST
ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results :
checkbox_form.checkbox.length
is
null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| "Kathleen Anderson [MVP - FrontPage]"
<[email protected]>
wrote
in
| message | > With JavaScript:
http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I would
like
to
make
sure
| > > that at least one check box is checked before the
submit
button
sends
| the
| > > form off to a shopping cart. Any help is appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > >
http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
Thanks Thomas
Thomas A. Rowe said:
I would wait a few more days, to see if any one can help you modify the script from:
http://www.codeave.com/javascript/code.asp?u_log=7062
to work with your uniquely named checkboxes.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

I wait a few more days.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Russell said:
Is this thread done ? Should I repost?

Russell

I do appreciate your efforts.

Thank you.


Ok, you will have to wait for someone that works with JavaScript more
then
I do to help you change
it to meet you needs.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Thomas,
I would rather not use drop down boxes. So the alternative you
suggested
is
ok by me. I will be using it in 50 - 60 pages that all have similar
choices
(1-3 checkboxes) and all the check boxes will be similarly named.

Of course I do not know how to go about doing it, so your help is, as
usual
greatly appreciated.

Thanks again,

Russell

If you want to use checkboxes and check client-side you are going to
have
to change / duplicate the
JavaScript code to check each checkbox so that the checking function
has a
corresponding name for
each check box you want to have checked.

Alternatively, can you use a drop down, where you can set it so that
one
item has to be selected?
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Well the author didn't have a solution... Anyone else? All I want
to
do
is
make sure one of 2 or 3 checkboxes is checked off. All the
checkboxes
must
have unique names.

Much appreciated,

Russell

Thanks Thomas

It is not a FP issue either, it is a cart issue, since you must
name
each
checkbox uniquely, the
author may have a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

No I haven' to. I don't see it as a cart issue. The cart
works
fine.
I
would just like to prevent submission to the cart with empty
check
boxes.
Its not a big deal, but to some, I suspect it might be
annoying.
Not really knowing JavaScript, but having seen what can be
done,
I
didn't
think it would be too difficult to check for input before
submitting
the
forms.

Any other suggestions how to do this?

Thank You.

Russell


Have you contact your shopping cart vendor for help with this
issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the
call.
==============================================

Thanks Stefan.

I changed the names of the checkboxes and that script works
fine.
Problem is
my shopping cart expects the checkbox names to be
multi-item1,
multi-item2,
etc. I can't change those names and still have the shopping
cart
place a
checked item in the cart. Any suggestions?

Thanks

Russell

Are all your check boxes in your form named checkbox per
the
sample
code
<input type="checkbox" value="Hank Aaron"
name="checkbox">Hank
Aaron<br>
That's what checkbox_form.checkbox.length is looking for
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:


http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| TY Kathleen
|
| But that script proved too complicated for me. I was
able
to
get
it
to
do
| what I wanted in its "own" page but upon pasting into my
page
it
did
not
| work .
|
| I pasted this:
|
| <script Language="JavaScript">
| <!--
| function checkbox_checker()
| {
|
| // set var checkbox_choices to zero
|
| var checkbox_choices = 0;
|
| // Loop from zero to the one minus the number of
checkbox
button
selections
| for (counter = 0; counter <
checkbox_form.checkbox.length;
counter++)
| {
|
| // If a checkbox has been selected it will return true
| // (If not it will return false)
| if (checkbox_form.checkbox[counter].checked)
| { checkbox_choices = checkbox_choices + 1; }
|
| }
| if (checkbox_choices < 1 )
| {
| // If there were less then selections made display an
alert
box
| alert("Please make a selection.")
| return (false);
| }
| }
|
| -->
| </script>
|
| And this :
|
| <FORM METHOD=POST
ACTION="http://www.myurl/cgi-bin/cart.pl"
onsubmit="return
| checkbox_checker()" name="checkbox_form">
|
|
| And get the results :
checkbox_form.checkbox.length
is
null
or
not
| an object.
|
| Any other hints for me?
|
| Thanks
|
| Russell
|
|
|
| "Kathleen Anderson [MVP - FrontPage]"
<[email protected]>
wrote
in
| message | > With JavaScript:
http://www.codeave.com/javascript/code.asp?u_log=7062
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web: http://www.spiderwebwoman.com/resources/
| >
| >
| > | > > Hello ,
| > >
| > > I have a page that has multiple check boxes. I
would
like
to
make
sure
| > > that at least one check box is checked before the
submit
button
sends
| the
| > > form off to a shopping cart. Any help is
appreciated.
| > >
| > > Thanks,
| > >
| > > Russell
| > >
| > >
http://www.kenortongallery.com/landscapes/americanlight.htm
| > >
| > >
| >
| >
|
|
 
Back
Top