36 users online (2 members and 34 guests)  


  Results 1 to 8 of 8
  1. #1
    marcosviloria's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2009
    Posts
    4

    checkallboxes problem

    Hey all!

    Im trying to create my first webpage, and I need some help please, thanks in advance

    I have 2 questions :

    1/ I am working with checkboxes, and I added checkall boxes, but it doesnt check what I want it to check.
    What do I have to do and why?

    2/ please give me any information you think I may need according to what I am doing.

    Thank you very much!!!!

    Marcos

    ps: this is what I did:
    HTML Code:
    <HTML>
    
    <HEAD>
    
    <TITLE>
    CBO Autos Venezuela
    </TITLE>
    
    </HEAD>
    
    <style>
    
    html
    {
    height: 100%;
    }
    
    body
    {
    background-image: url("cbo2.jpg");
    background-repeat: no-repeat;
    background-position: 50% 50%
    }
    
    </style>
    
    
    
    <BODY>
    
    <HR WIDTH="25%" COLOR="#6699FF" SIZE="6">
    
    
    <B>DONDE?</B> &nbsp;&nbsp;&nbsp;Estado:
    
    <script language="JavaScript">
    function toggle(source)
    {checkboxes = document.getElementsByName('estado');
    for each(var checkbox in checkboxes)
    checkbox.checked = source.checked;}
    </script>
    
    
    (<input type="checkbox" onClick="toggle(this)" /> Seleccionar todo)<br/>
    <INPUT type="checkbox" name="estado"> Amazonas
    <INPUT type="checkbox" name="estado"> Anzoátegui
    <INPUT type="checkbox" name="estado"> Apure
    <INPUT type="checkbox" name="estado"> Aragua
    <INPUT type="checkbox" name="estado"> Barinas
    <INPUT type="checkbox" name="estado"> Bolívar
    <INPUT type="checkbox" name="estado"> Carabobo
    <INPUT type="checkbox" name="estado"> Cojedes
    <INPUT type="checkbox" name="estado"> Delta Amacuro
    <INPUT type="checkbox" name="estado"> Falcón
    <INPUT type="checkbox" name="estado"> Guárico
    <INPUT type="checkbox" name="estado"> Lara
    <INPUT type="checkbox" name="estado"> Miranda
    <INPUT type="checkbox" name="estado"> Monagas
    <INPUT type="checkbox" name="estado"> Nueva Esparta
    <INPUT type="checkbox" name="estado"> Portuguesa
    <INPUT type="checkbox" name="estado"> Sucre
    <INPUT type="checkbox" name="estado"> Trujillo
    <INPUT type="checkbox" name="estado"> Táchira
    <INPUT type="checkbox" name="estado"> Vargas
    <INPUT type="checkbox" name="estado"> Yaracuy
    <INPUT type="checkbox" name="estado"> Zulia
    
    <BR><BR>
    <B>CUAL?</B> &nbsp;&nbsp;&nbsp;Marca:
    
    <script language="JavaScript">
    function toggle(source)
    {checkboxes = document.getElementsByName('marca');
    for each(var checkbox in checkboxes)
    checkbox.checked = source.checked;}
    </script>
    
    (<input type="checkbox" onClick="toggle(this)" /> Seleccionar todo)<br/>
    
    
    <INPUT type="checkbox" name="marca"> Acura
    <INPUT type="checkbox" name="marca"> Alfa Romeo
    <INPUT type="checkbox" name="marca"> AMX
    <INPUT type="checkbox" name="marca"> Aro
    <INPUT type="checkbox" name="marca"> Aston Martin
    <INPUT type="checkbox" name="marca"> Audi
    <INPUT type="checkbox" name="marca"> BMW
    <INPUT type="checkbox" name="marca"> Buick
    <INPUT type="checkbox" name="marca"> Cadillac
    <INPUT type="checkbox" name="marca"> Chana
    <INPUT type="checkbox" name="marca"> Changhe
    <INPUT type="checkbox" name="marca"> Chery
    <INPUT type="checkbox" name="marca"> Chevrolet
    <INPUT type="checkbox" name="marca"> Chrysler
    <INPUT type="checkbox" name="marca"> Citroen
    <INPUT type="checkbox" name="marca"> Covette
    <INPUT type="checkbox" name="marca"> Daewoo
    <INPUT type="checkbox" name="marca"> Daihatsu
    <INPUT type="checkbox" name="marca"> Eagle
    <INPUT type="checkbox" name="marca"> Fiat
    <INPUT type="checkbox" name="marca"> Ford
    <INPUT type="checkbox" name="marca"> Geely
    <INPUT type="checkbox" name="marca"> GMC
    <INPUT type="checkbox" name="marca"> Great Wall
    <INPUT type="checkbox" name="marca"> Hafei
    <INPUT type="checkbox" name="marca"> Haima
    <INPUT type="checkbox" name="marca"> Honda
    <INPUT type="checkbox" name="marca"> Hummer
    <INPUT type="checkbox" name="selection"> Hyundai
    <INPUT type="checkbox" name="marca"> Infiniti
    <INPUT type="checkbox" name="marca"> Isuzu
    <INPUT type="checkbox" name="marca"> Jaguar
    <INPUT type="checkbox" name="marca"> Jeep
    <INPUT type="checkbox" name="marca"> JMC
    <INPUT type="checkbox" name="marca"> Kia
    <INPUT type="checkbox" name="marca"> Lada
    <INPUT type="checkbox" name="marca"> Land Rover
    <INPUT type="checkbox" name="marca"> Lexus
    <INPUT type="checkbox" name="marca"> Lincoln
    <INPUT type="checkbox" name="marca"> Maserati
    <INPUT type="checkbox" name="marca"> Mazda
    <INPUT type="checkbox" name="marca"> Mercedes Benz
    <INPUT type="checkbox" name="marca"> Mercury
    <INPUT type="checkbox" name="marca"> Mini
    <INPUT type="checkbox" name="marca"> Mitsubishi
    <INPUT type="checkbox" name="marca"> Nissan
    <INPUT type="checkbox" name="marca"> Oldsmobile
    <INPUT type="checkbox" name="marca"> Opel
    <INPUT type="checkbox" name="marca"> Peugeot
    <INPUT type="checkbox" name="marca"> Pontiac
    <INPUT type="checkbox" name="marca"> Porsche
    <INPUT type="checkbox" name="marca"> Renault
    <INPUT type="checkbox" name="marca"> Rover
    <INPUT type="checkbox" name="marca"> Saic Wuling
    <INPUT type="checkbox" name="marca"> Saturn
    <INPUT type="checkbox" name="marca"> Scion
    <INPUT type="checkbox" name="marca"> Seat
    <INPUT type="checkbox" name="marca"> Shuguang
    <INPUT type="checkbox" name="marca"> Skoda
    <INPUT type="checkbox" name="marca"> Ssangyong
    <INPUT type="checkbox" name="marca"> Steyr Puch
    <INPUT type="checkbox" name="marca"> Subaru
    <INPUT type="checkbox" name="marca"> Suzuki
    <INPUT type="checkbox" name="marca"> Tata
    <INPUT type="checkbox" name="marca"> Toyota
    <INPUT type="checkbox" name="marca"> Volkswagen
    <INPUT type="checkbox" name="marca"> Volvo
    <INPUT type="checkbox" name="marca"> Zhongxing
    <INPUT type="checkbox" name="marca"> Zotye Auto
    <INPUT type="checkbox" name="marca"> Otras
    <BR><BR>
    <B>COMO?</B> &nbsp;&nbsp;&nbsp;Puertas:<BR>
    <INPUT type="checkbox" name="selection"> 2
    <INPUT type="checkbox" name="selection"> 4
    <BR><BR>
    <B>CUANDO?</B> &nbsp;&nbsp;&nbsp;Año:
    (seleccionar todo<INPUT type="checkbox" name="selection"> )
    <BR>
    <INPUT type="checkbox" name="selection"> < 1980
    <INPUT type="checkbox" name="selection"> 1981
    <INPUT type="checkbox" name="selection"> 1982
    <INPUT type="checkbox" name="selection"> 1983
    <INPUT type="checkbox" name="selection"> 1984
    <INPUT type="checkbox" name="selection"> 1985
    <INPUT type="checkbox" name="selection"> 1986
    <INPUT type="checkbox" name="selection"> 1987
    <INPUT type="checkbox" name="selection"> 1988
    <INPUT type="checkbox" name="selection"> 1989
    <INPUT type="checkbox" name="selection"> 1990
    <INPUT type="checkbox" name="selection"> 1991
    <INPUT type="checkbox" name="selection"> 1992
    <INPUT type="checkbox" name="selection"> 1993
    <INPUT type="checkbox" name="selection"> 1994
    <INPUT type="checkbox" name="selection"> 1995
    <INPUT type="checkbox" name="selection"> 1996
    <INPUT type="checkbox" name="selection"> 1997
    <INPUT type="checkbox" name="selection"> 1998
    <INPUT type="checkbox" name="selection"> 1999
    <INPUT type="checkbox" name="selection"> 2000
    <INPUT type="checkbox" name="selection"> 2001
    <INPUT type="checkbox" name="selection"> 2002
    <INPUT type="checkbox" name="selection"> 2003
    <INPUT type="checkbox" name="selection"> 2004
    <INPUT type="checkbox" name="selection"> 2005
    <INPUT type="checkbox" name="selection"> 2006
    <INPUT type="checkbox" name="selection"> 2007
    <INPUT type="checkbox" name="selection"> 2008
    <INPUT type="checkbox" name="selection"> 2009
    <BR><BR>
    <B>CUANTO?</B> &nbsp;&nbsp;&nbsp;Precio mini:<BR>
    <INPUT type="checkbox" name="selection"> 0 BsF
    <INPUT type="checkbox" name="selection"> 5.000 BsF
    <INPUT type="checkbox" name="selection"> 10.000 BsF
    <INPUT type="checkbox" name="selection"> 15.000 BsF
    <INPUT type="checkbox" name="selection"> 20.000 BsF
    <INPUT type="checkbox" name="selection"> 25.000 BsF
    <INPUT type="checkbox" name="selection"> 30.000 BsF
    <INPUT type="checkbox" name="selection"> 35.000 BsF
    <INPUT type="checkbox" name="selection"> 40.000 BsF
    <INPUT type="checkbox" name="selection"> 45.000 BsF
    <INPUT type="checkbox" name="selection"> 50.000 BsF
    <INPUT type="checkbox" name="selection"> 55.000 BsF
    <INPUT type="checkbox" name="selection"> 60.000 BsF
    <INPUT type="checkbox" name="selection"> 65.000 BsF
    <INPUT type="checkbox" name="selection"> 70.000 BsF
    <INPUT type="checkbox" name="selection"> 75.000 BsF
    <INPUT type="checkbox" name="selection"> 80.000 BsF
    <INPUT type="checkbox" name="selection"> 85.000 BsF
    <INPUT type="checkbox" name="selection"> 90.000 BsF
    <INPUT type="checkbox" name="selection"> 95.000 BsF
    <INPUT type="checkbox" name="selection"> 100.000 BsF
    <br><br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Precio maxi:<br>
    
    <INPUT type="checkbox" name="selection"> 5.000 BsF
    <INPUT type="checkbox" name="selection"> 10.000 BsF
    <INPUT type="checkbox" name="selection"> 15.000 BsF
    <INPUT type="checkbox" name="selection"> 20.000 BsF
    <INPUT type="checkbox" name="selection"> 25.000 BsF
    <INPUT type="checkbox" name="selection"> 30.000 BsF
    <INPUT type="checkbox" name="selection"> 35.000 BsF
    <INPUT type="checkbox" name="selection"> 40.000 BsF
    <INPUT type="checkbox" name="selection"> 45.000 BsF
    <INPUT type="checkbox" name="selection"> 50.000 BsF
    <INPUT type="checkbox" name="selection"> 55.000 BsF
    <INPUT type="checkbox" name="selection"> 60.000 BsF
    <INPUT type="checkbox" name="selection"> 65.000 BsF
    <INPUT type="checkbox" name="selection"> 70.000 BsF
    <INPUT type="checkbox" name="selection"> 75.000 BsF
    <INPUT type="checkbox" name="selection"> 80.000 BsF
    <INPUT type="checkbox" name="selection"> 85.000 BsF
    <INPUT type="checkbox" name="selection"> 90.000 BsF
    <INPUT type="checkbox" name="selection"> 95.000 BsF
    <INPUT type="checkbox" name="selection"> 100.000 BsF
    <INPUT type="checkbox" name="selection"> > 100.000 BsF
    
    <br>
    <p style="text-align: center;">MI
    
    ANUNCIO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT type="Submit"
    
    VALUE="Buscar">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FAQ</P>
    
    <HR WIDTH="25%" COLOR=red SIZE="6">
    
    </BODY>
    
    </HTML>
    Last edited by HTML; 03-29-2009 at 11:07 PM.

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: checkallboxes problem

    Hi there Marcos,

    and a warm welcome to these forums.

    I have amended the javascript so that it now works and have corrected your html so that it now validates.

    I would suggest that you make use of it yourself...

    ...as it is great for finfing your coding errors.

    Here is your reworked page...
    Code:
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <title>CBO Autos Venezuela</title>
    
    <style type="text/css">
    html {
        height: 100%;
     }
    body {
        background-image:url(cbo2.jpg);
        background-repeat:no-repeat;
        background-position: 50% 50%
     }
    #hr1 {
        width:25%;
        color:#69f;
        background-color:#69f;
        height:6px;
    }
    #hr2 {
        width:25%;
        color:#f00;
        background-color:#f00;
        height:6px;
    }
    h1,h2,h3,h4,h5,h6 {
        margin:0 24px 0 0;
        font-size:16px;
        float:left;
     }
    h6 {
        margin:0 100px 0 0;
     }
    .group {
        margin-bottom:20px;
     }
    #button {
        text-align:center;
     }
    #button input {
        margin:0 50px;
     }
    </style>
    
    <script type="text/javascript">
    function toggle(source,n){
       checkboxes=document.getElementsByName(n);
    for(c=0;c<checkboxes.length;c++){
       checkboxes[c].checked=source.checked;
      }
     }
    </script>
    
    </head>
    <body>
    
    <hr id="hr1">
    
    <div>
    <h1>DONDE?</h1>Estado: (<input type="checkbox" onclick="toggle(this,'estado')"> Seleccionar todo)
    </div>
    
    <div class="group">
    <input type="checkbox" name="estado"> Amazonas
    <input type="checkbox" name="estado"> Anzoátegui
    <input type="checkbox" name="estado"> Apure
    <input type="checkbox" name="estado"> Aragua
    <input type="checkbox" name="estado"> Barinas
    <input type="checkbox" name="estado"> Bolívar
    <input type="checkbox" name="estado"> Carabobo
    <input type="checkbox" name="estado"> Cojedes
    <input type="checkbox" name="estado"> Delta Amacuro
    <input type="checkbox" name="estado"> Falcón
    <input type="checkbox" name="estado"> Guárico
    <input type="checkbox" name="estado"> Lara
    <input type="checkbox" name="estado"> Miranda
    <input type="checkbox" name="estado"> Monagas
    <input type="checkbox" name="estado"> Nueva Esparta
    <input type="checkbox" name="estado"> Portuguesa
    <input type="checkbox" name="estado"> Sucre
    <input type="checkbox" name="estado"> Trujillo
    <input type="checkbox" name="estado"> Táchira
    <input type="checkbox" name="estado"> Vargas
    <input type="checkbox" name="estado"> Yaracuy
    <input type="checkbox" name="estado"> Zulia
    </div>
    
    <div>
    <h2>CUAL?</h2>Marca: (<input type="checkbox" onclick="toggle(this,'marca')"> Seleccionar todo)
    </div>
    
    <div class="group">
    <input type="checkbox" name="marca"> Acura
    <input type="checkbox" name="marca"> Alfa Romeo
    <input type="checkbox" name="marca"> AMX
    <input type="checkbox" name="marca"> Aro
    <input type="checkbox" name="marca"> Aston Martin
    <input type="checkbox" name="marca"> Audi
    <input type="checkbox" name="marca"> BMW
    <input type="checkbox" name="marca"> Buick
    <input type="checkbox" name="marca"> Cadillac
    <input type="checkbox" name="marca"> Chana
    <input type="checkbox" name="marca"> Changhe
    <input type="checkbox" name="marca"> Chery
    <input type="checkbox" name="marca"> Chevrolet
    <input type="checkbox" name="marca"> Chrysler
    <input type="checkbox" name="marca"> Citroen
    <input type="checkbox" name="marca"> Covette
    <input type="checkbox" name="marca"> Daewoo
    <input type="checkbox" name="marca"> Daihatsu
    <input type="checkbox" name="marca"> Eagle
    <input type="checkbox" name="marca"> Fiat
    <input type="checkbox" name="marca"> Ford
    <input type="checkbox" name="marca"> Geely
    <input type="checkbox" name="marca"> GMC
    <input type="checkbox" name="marca"> Great Wall
    <input type="checkbox" name="marca"> Hafei
    <input type="checkbox" name="marca"> Haima
    <input type="checkbox" name="marca"> Honda
    <input type="checkbox" name="marca"> Hummer
    <input type="checkbox" name="selection"> Hyundai
    <input type="checkbox" name="marca"> Infiniti
    <input type="checkbox" name="marca"> Isuzu
    <input type="checkbox" name="marca"> Jaguar
    <input type="checkbox" name="marca"> Jeep
    <input type="checkbox" name="marca"> JMC
    <input type="checkbox" name="marca"> Kia
    <input type="checkbox" name="marca"> Lada
    <input type="checkbox" name="marca"> Land Rover
    <input type="checkbox" name="marca"> Lexus
    <input type="checkbox" name="marca"> Lincoln
    <input type="checkbox" name="marca"> Maserati
    <input type="checkbox" name="marca"> Mazda
    <input type="checkbox" name="marca"> Mercedes Benz
    <input type="checkbox" name="marca"> Mercury
    <input type="checkbox" name="marca"> Mini
    <input type="checkbox" name="marca"> Mitsubishi
    <input type="checkbox" name="marca"> Nissan
    <input type="checkbox" name="marca"> Oldsmobile
    <input type="checkbox" name="marca"> Opel
    <input type="checkbox" name="marca"> Peugeot
    <input type="checkbox" name="marca"> Pontiac
    <input type="checkbox" name="marca"> Porsche
    <input type="checkbox" name="marca"> Renault
    <input type="checkbox" name="marca"> Rover
    <input type="checkbox" name="marca"> Saic Wuling
    <input type="checkbox" name="marca"> Saturn
    <input type="checkbox" name="marca"> Scion
    <input type="checkbox" name="marca"> Seat
    <input type="checkbox" name="marca"> Shuguang
    <input type="checkbox" name="marca"> Skoda
    <input type="checkbox" name="marca"> Ssangyong
    <input type="checkbox" name="marca"> Steyr Puch
    <input type="checkbox" name="marca"> Subaru
    <input type="checkbox" name="marca"> Suzuki
    <input type="checkbox" name="marca"> Tata
    <input type="checkbox" name="marca"> Toyota
    <input type="checkbox" name="marca"> Volkswagen
    <input type="checkbox" name="marca"> Volvo
    <input type="checkbox" name="marca"> Zhongxing
    <input type="checkbox" name="marca"> Zotye Auto
    <input type="checkbox" name="marca"> Otras
    </div>
    
    <div>
    <h3>COMO?</h3>Puertas
    </div>
    
    <div class="group">
    <input type="checkbox" name="selection"> 2
    <input type="checkbox" name="selection"> 4
    </div>
    
    <div>
    <h4>CUANDO?</h4>Año:(seleccionar todo<input type="checkbox" name="selection"> )
    </div>
    
    <div class="group">
    <input type="checkbox" name="selection"> < 1980
    <input type="checkbox" name="selection"> 1981
    <input type="checkbox" name="selection"> 1982
    <input type="checkbox" name="selection"> 1983
    <input type="checkbox" name="selection"> 1984
    <input type="checkbox" name="selection"> 1985
    <input type="checkbox" name="selection"> 1986
    <input type="checkbox" name="selection"> 1987
    <input type="checkbox" name="selection"> 1988
    <input type="checkbox" name="selection"> 1989
    <input type="checkbox" name="selection"> 1990
    <input type="checkbox" name="selection"> 1991
    <input type="checkbox" name="selection"> 1992
    <input type="checkbox" name="selection"> 1993
    <input type="checkbox" name="selection"> 1994
    <input type="checkbox" name="selection"> 1995
    <input type="checkbox" name="selection"> 1996
    <input type="checkbox" name="selection"> 1997
    <input type="checkbox" name="selection"> 1998
    <input type="checkbox" name="selection"> 1999
    <input type="checkbox" name="selection"> 2000
    <input type="checkbox" name="selection"> 2001
    <input type="checkbox" name="selection"> 2002
    <input type="checkbox" name="selection"> 2003
    <input type="checkbox" name="selection"> 2004
    <input type="checkbox" name="selection"> 2005
    <input type="checkbox" name="selection"> 2006
    <input type="checkbox" name="selection"> 2007
    <input type="checkbox" name="selection"> 2008
    <input type="checkbox" name="selection"> 2009
    </div>
    
    <div>
    <h5>CUANTO?</h5>mini:
    </div>
    
    <div class="group">
    <input type="checkbox" name="selection"> 0 BsF
    <input type="checkbox" name="selection"> 5.000 BsF
    <input type="checkbox" name="selection"> 10.000 BsF
    <input type="checkbox" name="selection"> 15.000 BsF
    <input type="checkbox" name="selection"> 20.000 BsF
    <input type="checkbox" name="selection"> 25.000 BsF
    <input type="checkbox" name="selection"> 30.000 BsF
    <input type="checkbox" name="selection"> 35.000 BsF
    <input type="checkbox" name="selection"> 40.000 BsF
    <input type="checkbox" name="selection"> 45.000 BsF
    <input type="checkbox" name="selection"> 50.000 BsF
    <input type="checkbox" name="selection"> 55.000 BsF
    <input type="checkbox" name="selection"> 60.000 BsF
    <input type="checkbox" name="selection"> 65.000 BsF
    <input type="checkbox" name="selection"> 70.000 BsF
    <input type="checkbox" name="selection"> 75.000 BsF
    <input type="checkbox" name="selection"> 80.000 BsF
    <input type="checkbox" name="selection"> 85.000 BsF
    <input type="checkbox" name="selection"> 90.000 BsF
    <input type="checkbox" name="selection"> 95.000 BsF
    <input type="checkbox" name="selection"> 100.000 BsF
    </div>
    
    <div>
    <h6>&nbsp;</h6>Precio maxi:
    </div>
    
    <div class="group">
    <input type="checkbox" name="selection"> 5.000 BsF
    <input type="checkbox" name="selection"> 10.000 BsF
    <input type="checkbox" name="selection"> 15.000 BsF
    <input type="checkbox" name="selection"> 20.000 BsF
    <input type="checkbox" name="selection"> 25.000 BsF
    <input type="checkbox" name="selection"> 30.000 BsF
    <input type="checkbox" name="selection"> 35.000 BsF
    <input type="checkbox" name="selection"> 40.000 BsF
    <input type="checkbox" name="selection"> 45.000 BsF
    <input type="checkbox" name="selection"> 50.000 BsF
    <input type="checkbox" name="selection"> 55.000 BsF
    <input type="checkbox" name="selection"> 60.000 BsF
    <input type="checkbox" name="selection"> 65.000 BsF
    <input type="checkbox" name="selection"> 70.000 BsF
    <input type="checkbox" name="selection"> 75.000 BsF
    <input type="checkbox" name="selection"> 80.000 BsF
    <input type="checkbox" name="selection"> 85.000 BsF
    <input type="checkbox" name="selection"> 90.000 BsF
    <input type="checkbox" name="selection"> 95.000 BsF
    <input type="checkbox" name="selection"> 100.000 BsF
    <input type="checkbox" name="selection"> 100.000 BsF
    </div>
    
    <div id="button">MI ANUNCIO<input type="Submit" value="Buscar">FAQ</div>
    
    <hr id="hr2">
    
    </body>
    </html>
    

  3. #3
    marcosviloria's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2009
    Posts
    4

    Re: checkallboxes problem

    Thank you so much my friend!!! you are the best!

    I would like to put those informations into big cases... I dont know if you see what I mean (sorry for my English, Im French)

    I want all the ESTADO checkboxes in a case... all the MARCA checkboxes in another case...

    To present it better organized... you know...

    And then I would like to be able to move those cases exactly where I want to on the page...

    could you help me with this?

    thanks again!!

  4. #4
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: checkallboxes problem

    Hi there marcosviloria,

    I want all the ESTADO checkboxes in a case.....
    And then I would like to be able to move those cases exactly where I want to on the page...
    They are already in a case - it is the div elememt with the class name group.
    You may move them to any place on your page.
    If required you could also move them individually - the javascript will find them wherever they are.

  5. #5
    marcosviloria's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2009
    Posts
    4

    Re: checkallboxes problem

    I mean in cases that I can see, I dont know how to explain it sorry, as in the attached filed. Let me know if you understand what I mean, thanks alot!!
    Attached Images Attached Images

  6. #6
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: checkallboxes problem

    Hi there marcosviloria,

    Perhaps something like this then...
    Code:
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <title>CBO Autos Venezuela</title>
    
    <style type="text/css">
    #container {
        width:1074px;
        padding:10px;
        margin:auto;
        border:3px double #999;
        background-color:#eef;
     }
    html {
        height: 100%;
     }
    body {
        background-image:url(cbo2.jpg);
        background-repeat:no-repeat;
        background-position: 50% 50%
     }
    #hr1 {
        width:25%;
        color:#69f;
        margin-bottom:20px;
        background-color:#69f;
        height:6px;
    }
    #hr2 {
        width:25%;
        margin-top:20px;
        color:#f00;
        background-color:#f00;
        height:6px;
    }
    h1,h2,h3,h4,h5,h6 {
        margin:0 24px 0 0;
        font-size:16px;
        float:left;
     }
    h6 {
        margin:0 100px 0 0;
     }
    .group {
        float:left;
        padding:10px;
        margin-bottom:20px;
        border:1px solid #000;
        background-color:#fff;
     }
    .donde {
        width:480px;
     }
    .cuando {
        width:360px;
        margin-left:100px;
     }
    .cual {
        clear:both;
        width:530px;
     }
    .como {
        width:160px;
        margin-left:175px;
    }
    .cuanto {
        width:490px;
        margin-left:10px;
     }
    .precio {
        clear:both;
        float:none;
        width:500px;
        margin:0 auto 20px;
     }
    #button {
        clear:both;
        text-align:center;
     }
    #button input {
        margin:0 50px;
     }
    </style>
    
    <script type="text/javascript">
    function toggle(source,n){
       checkboxes=document.getElementsByName(n);
    for(c=0;c<checkboxes.length;c++){
       checkboxes[c].checked=source.checked;
      }
     }
    </script>
    
    </head>
    <body>
    
    <div id="container">
    
    <hr id="hr1">
    
    <div class="group donde">
    <div>
    <h1>DONDE?</h1>Estado: (<input type="checkbox" onclick="toggle(this,'estado')"> Seleccionar todo)
    </div>
    <input type="checkbox" name="estado"> Amazonas
    <input type="checkbox" name="estado"> Anzoátegui
    <input type="checkbox" name="estado"> Apure
    <input type="checkbox" name="estado"> Aragua<br>
    <input type="checkbox" name="estado"> Barinas
    <input type="checkbox" name="estado"> Bolívar
    <input type="checkbox" name="estado"> Carabobo
    <input type="checkbox" name="estado"> Cojedes<br>
    <input type="checkbox" name="estado"> Delta Amacuro
    <input type="checkbox" name="estado"> Falcón
    <input type="checkbox" name="estado"> Guárico
    <input type="checkbox" name="estado"> Lara<br>
    <input type="checkbox" name="estado"> Miranda
    <input type="checkbox" name="estado"> Monagas
    <input type="checkbox" name="estado"> Nueva Esparta
    <input type="checkbox" name="estado"> Portuguesa<br>
    <input type="checkbox" name="estado"> Sucre
    <input type="checkbox" name="estado"> Trujillo
    <input type="checkbox" name="estado"> Táchira
    <input type="checkbox" name="estado"> Vargas<br>
    <input type="checkbox" name="estado"> Yaracuy
    <input type="checkbox" name="estado"> Zulia
    </div>
    
    <div class="group cuando">
    <div>
    <h4>CUANDO?</h4>Año:(seleccionar todo<input type="checkbox" name="selection"> )
    </div>
    <input type="checkbox" name="selection"> 1980
    <input type="checkbox" name="selection"> 1981
    <input type="checkbox" name="selection"> 1982
    <input type="checkbox" name="selection"> 1983
    <input type="checkbox" name="selection"> 1984<br>
    <input type="checkbox" name="selection"> 1985
    <input type="checkbox" name="selection"> 1986
    <input type="checkbox" name="selection"> 1987
    <input type="checkbox" name="selection"> 1988
    <input type="checkbox" name="selection"> 1989<br>
    <input type="checkbox" name="selection"> 1990
    <input type="checkbox" name="selection"> 1991
    <input type="checkbox" name="selection"> 1992
    <input type="checkbox" name="selection"> 1993
    <input type="checkbox" name="selection"> 1994<br>
    <input type="checkbox" name="selection"> 1995
    <input type="checkbox" name="selection"> 1996
    <input type="checkbox" name="selection"> 1997
    <input type="checkbox" name="selection"> 1998
    <input type="checkbox" name="selection"> 1999<br>
    <input type="checkbox" name="selection"> 2000
    <input type="checkbox" name="selection"> 2001
    <input type="checkbox" name="selection"> 2002
    <input type="checkbox" name="selection"> 2003
    <input type="checkbox" name="selection"> 2004<br>
    <input type="checkbox" name="selection"> 2005
    <input type="checkbox" name="selection"> 2006
    <input type="checkbox" name="selection"> 2007
    <input type="checkbox" name="selection"> 2008
    <input type="checkbox" name="selection"> 2009
    </div>
    
    <div class="group cual">
    <div>
    <h2>CUAL?</h2>Marca: (<input type="checkbox" onclick="toggle(this,'marca')"> Seleccionar todo)
    </div>
    <input type="checkbox" name="marca"> Acura
    <input type="checkbox" name="marca"> Alfa Romeo
    <input type="checkbox" name="marca"> AMX
    <input type="checkbox" name="marca"> Aro
    <input type="checkbox" name="marca"> Aston Martin<br>
    <input type="checkbox" name="marca"> Audi
    <input type="checkbox" name="marca"> BMW
    <input type="checkbox" name="marca"> Buick
    <input type="checkbox" name="marca"> Cadillac
    <input type="checkbox" name="marca"> Chana<br>
    <input type="checkbox" name="marca"> Changhe
    <input type="checkbox" name="marca"> Chery
    <input type="checkbox" name="marca"> Chevrolet
    <input type="checkbox" name="marca"> Chrysler
    <input type="checkbox" name="marca"> Citroen<br>
    <input type="checkbox" name="marca"> Covette
    <input type="checkbox" name="marca"> Daewoo
    <input type="checkbox" name="marca"> Daihatsu
    <input type="checkbox" name="marca"> Eagle
    <input type="checkbox" name="marca"> Fiat<br>
    <input type="checkbox" name="marca"> Ford
    <input type="checkbox" name="marca"> Geely
    <input type="checkbox" name="marca"> GMC
    <input type="checkbox" name="marca"> Great Wall<br>
    <input type="checkbox" name="marca"> Hafei
    <input type="checkbox" name="marca"> Haima
    <input type="checkbox" name="marca"> Honda
    <input type="checkbox" name="marca"> Hummer
    <input type="checkbox" name="selection"> Hyundai<br>
    <input type="checkbox" name="marca"> Infiniti
    <input type="checkbox" name="marca"> Isuzu
    <input type="checkbox" name="marca"> Jaguar
    <input type="checkbox" name="marca"> Jeep
    <input type="checkbox" name="marca"> JMC<br>
    <input type="checkbox" name="marca"> Kia
    <input type="checkbox" name="marca"> Lada
    <input type="checkbox" name="marca"> Land Rover
    <input type="checkbox" name="marca"> Lexus
    <input type="checkbox" name="marca"> Lincoln<br>
    <input type="checkbox" name="marca"> Maserati
    <input type="checkbox" name="marca"> Mazda
    <input type="checkbox" name="marca"> Mercedes Benz
    <input type="checkbox" name="marca"> Mercury
    <input type="checkbox" name="marca"> Mini<br>
    <input type="checkbox" name="marca"> Mitsubishi
    <input type="checkbox" name="marca"> Nissan
    <input type="checkbox" name="marca"> Oldsmobile
    <input type="checkbox" name="marca"> Opel
    <input type="checkbox" name="marca"> Peugeot<br>
    <input type="checkbox" name="marca"> Pontiac
    <input type="checkbox" name="marca"> Porsche
    <input type="checkbox" name="marca"> Renault
    <input type="checkbox" name="marca"> Rover
    <input type="checkbox" name="marca"> Saic Wuling<br>
    <input type="checkbox" name="marca"> Saturn
    <input type="checkbox" name="marca"> Scion
    <input type="checkbox" name="marca"> Seat
    <input type="checkbox" name="marca"> Shuguang
    <input type="checkbox" name="marca"> Skoda<br>
    <input type="checkbox" name="marca"> Ssangyong
    <input type="checkbox" name="marca"> Steyr Puch
    <input type="checkbox" name="marca"> Subaru
    <input type="checkbox" name="marca"> Suzuki
    <input type="checkbox" name="marca"> Tata<br>
    <input type="checkbox" name="marca"> Toyota
    <input type="checkbox" name="marca"> Volkswagen
    <input type="checkbox" name="marca"> Volvo
    <input type="checkbox" name="marca"> Zhongxing
    <input type="checkbox" name="marca"> Zotye Auto<br>
    <input type="checkbox" name="marca"> Otras
    </div>
    
    <div class="group como">
    <div>
    <h3>COMO?</h3>Puertas
    </div>
    <input type="checkbox" name="selection"> 2
    <input type="checkbox" name="selection"> 4
    </div>
    
    <div class="group cuanto">
    <div>
    <h5>CUANTO?</h5>mini:
    </div>
    <input type="checkbox" name="selection"> 0 BsF
    <input type="checkbox" name="selection"> 5.000 BsF
    <input type="checkbox" name="selection"> 10.000 BsF
    <input type="checkbox" name="selection"> 15.000 BsF<br>
    <input type="checkbox" name="selection"> 20.000 BsF
    <input type="checkbox" name="selection"> 25.000 BsF
    <input type="checkbox" name="selection"> 30.000 BsF
    <input type="checkbox" name="selection"> 35.000 BsF<br>
    <input type="checkbox" name="selection"> 40.000 BsF
    <input type="checkbox" name="selection"> 45.000 BsF
    <input type="checkbox" name="selection"> 50.000 BsF
    <input type="checkbox" name="selection"> 55.000 BsF<br>
    <input type="checkbox" name="selection"> 60.000 BsF
    <input type="checkbox" name="selection"> 65.000 BsF
    <input type="checkbox" name="selection"> 70.000 BsF
    <input type="checkbox" name="selection"> 75.000 BsF<br>
    <input type="checkbox" name="selection"> 80.000 BsF
    <input type="checkbox" name="selection"> 85.000 BsF
    <input type="checkbox" name="selection"> 90.000 BsF
    <input type="checkbox" name="selection"> 95.000 BsF<br>
    <input type="checkbox" name="selection"> 100.000 BsF
    </div>
    
    <div class="group precio">
    <div>
    <h6>&nbsp;</h6>Precio maxi:
    </div>
    <input type="checkbox" name="selection"> 5.000 BsF
    <input type="checkbox" name="selection"> 10.000 BsF
    <input type="checkbox" name="selection"> 15.000 BsF
    <input type="checkbox" name="selection"> 20.000 BsF<br>
    <input type="checkbox" name="selection"> 25.000 BsF
    <input type="checkbox" name="selection"> 30.000 BsF
    <input type="checkbox" name="selection"> 35.000 BsF
    <input type="checkbox" name="selection"> 40.000 BsF<br>
    <input type="checkbox" name="selection"> 45.000 BsF
    <input type="checkbox" name="selection"> 50.000 BsF
    <input type="checkbox" name="selection"> 55.000 BsF
    <input type="checkbox" name="selection"> 60.000 BsF<br>
    <input type="checkbox" name="selection"> 65.000 BsF
    <input type="checkbox" name="selection"> 70.000 BsF
    <input type="checkbox" name="selection"> 75.000 BsF
    <input type="checkbox" name="selection"> 80.000 BsF<br>
    <input type="checkbox" name="selection"> 85.000 BsF
    <input type="checkbox" name="selection"> 90.000 BsF
    <input type="checkbox" name="selection"> 95.000 BsF
    <input type="checkbox" name="selection"> 100.000 BsF<br>
    <input type="checkbox" name="selection"> 100.000 BsF
    </div>
    
    <div id="button">MI ANUNCIO<input type="Submit" value="Buscar">FAQ</div>
    
    <hr id="hr2">
    
    </div>
    
    </body>
    </html>
    

  7. #7
    marcosviloria's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2009
    Posts
    4

    Re: checkallboxes problem

    Thank you so much Coothead!!! you have been a very big help!! I will ask you some more help soon, but I am very busy with my job nowadays... Thanks again!!

  8. #8
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: checkallboxes problem

    No problem you're welcome.



Tags for this Thread