SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Location
    Iran, Tehran
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face checkbox; checkmark all

    checkbox

    Dear everybody,
    My question is checkbox. I've designed a code [mainly javaScript and HTML],
    full of checkboxes.
    I would like to keep similar icons together. So I need a checkbox for each similar group whenever it gets marked up, all the other similar cases got marked up.

    Let me bring an example:
    TT03 ALL

    Browse

    Create

    Delete

    Edit

    TT05
    ALL

    Browse

    Create

    Delete

    Edit

    So, clicking on the ckeckbox All in any case TT03, TT05 that will assign to it and the others, must enforce the others to be marked.


    Any kind of help is warmly appreciated.
    Bests,
    Keivan

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Location
    London, UK
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Give us a simpified piece of HTML that you've rendered and we can then maybe help you with the javascript. This is, after all, a javascript forum

  3. #3
    SitePoint Enthusiast johnmanoahs's Avatar
    Join Date
    Jul 2004
    Location
    India
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.sitepoint.com/forums/showthread.php?t=397405 - This thread has answers to all your questions I guess!!

    - John
    If you think you are too small to make an
    influence, try sleeping with a mosquito in a closed room.

  4. #4
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Location
    Iran, Tehran
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile html code

    Quote Originally Posted by peterbe
    Give us a simpified piece of HTML that you've rendered and we can then maybe help you with the javascript. This is, after all, a javascript forum
    I am really looking forward a code which does not cost me very much.
    My code is as follows:


    <html ><%@ page import = "java.sql.*,java.text.*,java.util.*,java.net.*,com.util.*,com.bipc.*" %>

    <head>

    <style>
    BODY {background-color:white}
    TD {font-size: 10pt;
    font-family: verdana,helvetica;
    text-decoration: none;
    white-space:nowrap;}
    A {text-decoration: none;
    color: black}
    </style>

    <script src="ua.js"></script>
    <script src="ftiens4.js"></script>
    <script src="demoCheckboxNodes.js"></script>

    <script>
    // This function depends on the actual prependHTML strings used in the
    // configuration file (dmeoChackboxNodes.js). If you change that, you will
    // have to change this
    function generateQueryString() {
    var retStr
    //getElById is defined in ftiens4.js and help with cross-browser compatibility
    retStr = "&BOX1=" + getElById('BOX1').checked
    retStr = retStr + "&BOX2=" + getElById('BOX2').checked
    retStr = retStr + "&BOX3=" + getElById('BOX3').checked

    retStr = retStr + "&BOX4=" + getElById('BOX4').checked
    retStr = retStr + "&BOX5 =" + getElById('BOX5').checked
    retStr = retStr + "&BOX6=" + getElById('BOX6').checked
    retStr = retStr + "&BOX7=" + getElById('BOX7').checked
    retStr = retStr + "&BOX8=" + getElById('BOX8').checked
    retStr = retStr + "&BOX9=" + getElById('BOX9').checked
    retStr = retStr + "&BOX10=" + getElById('BOX10').checked
    retStr = retStr + "&BOX11=" + getElById('BOX11').checked
    retStr = retStr + "&BOX12=" + getElById('BOX12').checked
    retStr = retStr + "&BOX13=" + getElById('BOX13').checked
    retStr = retStr + "&BOX14=" + getElById('BOX14').checked
    retStr = retStr + "&BOX15=" + getElById('BOX15').checked
    retStr = retStr + "&BOX16=" + getElById('BOX16').checked
    retStr = retStr + "&BOX17=" + getElById('BOX17').checked
    retStr = retStr + "&BOX18=" + getElById('BOX18').checked
    retStr = retStr + "&BOX19=" + getElById('BOX19').checked
    retStr = retStr + "&BOX20=" + getElById('BOX20').checked
    retStr = retStr + "&BOX21=" + getElById('BOX21').checked
    retStr = retStr + "&BOX22=" + getElById('BOX22').checked
    retStr = retStr + "&BOX23=" + getElById('BOX23').checked
    retStr = retStr + "&BOX24=" + getElById('BOX24').checked
    retStr = retStr + "&BOX25=" + getElById('BOX25').checked
    retStr = retStr + "&BOX26=" + getElById('BOX26').checked
    retStr = retStr + "&BOX27=" + getElById('BOX27').checked
    retStr = retStr + "&BOX28=" + getElById('BOX28').checked
    retStr = retStr + "&BOX29=" + getElById('BOX29').checked
    retStr = retStr + "&BOX30=" + getElById('BOX30').checked
    retStr = retStr + "&BOX31=" + getElById('BOX31').checked
    retStr = retStr + "&BOX32=" + getElById('BOX32').checked
    retStr = retStr + "&BOX33=" + getElById('BOX33').checked
    retStr = retStr + "&BOX34=" + getElById('BOX34').checked
    retStr = retStr + "&BOX35=" + getElById('BOX35').checked
    retStr = retStr + "&BOX36=" + getElById('BOX36').checked
    retStr = retStr + "&BOX37=" + getElById('BOX37').checked
    retStr = retStr + "&BOX38=" + getElById('BOX38').checked
    retStr = retStr + "&BOX39=" + getElById('BOX39').checked
    retStr = retStr + "&BOX40=" + getElById('BOX40').checked
    retStr = retStr + "&BOX41=" + getElById('BOX41').checked
    retStr = retStr + "&BOX42=" + getElById('BOX42').checked
    retStr = retStr + "&BOX43=" + getElById('BOX43').checked
    retStr = retStr + "&BOX44=" + getElById('BOX44').checked
    retStr = retStr + "&BOX45=" + getElById('BOX45').checked
    retStr = retStr + "&BOX46=" + getElById('BOX46').checked
    retStr = retStr + "&BOX47=" + getElById('BOX47').checked
    retStr = retStr + "&BOX48=" + getElById('BOX48').checked
    retStr = retStr + "&BOX49=" + getElById('BOX49').checked
    retStr = retStr + "&BOX50=" + getElById('BOX50').checked
    retStr = retStr + "&BOX51=" + getElById('BOX51').checked
    retStr = retStr + "&BOX52=" + getElById('BOX52').checked
    retStr = retStr + "&BOX53=" + getElById('BOX53').checked
    retStr = retStr + "&BOX54=" + getElById('BOX54').checked
    retStr = retStr + "&BOX55=" + getElById('BOX55').checked
    retStr = retStr + "&BOX56=" + getElById('BOX56').checked
    retStr = retStr + "&BOX57=" + getElById('BOX57').checked
    retStr = retStr + "&BOX58=" + getElById('BOX58').checked
    retStr = retStr + "&BOX59=" + getElById('BOX59').checked
    retStr = retStr + "&BOX60=" + getElById('BOX60').checked
    retStr = retStr + "&BOX61=" + getElById('BOX61').checked
    retStr = retStr + "&BOX62=" + getElById('BOX62').checked
    retStr = retStr + "&BOX63=" + getElById('BOX63').checked
    retStr = retStr + "&BOX64=" + getElById('BOX64').checked
    retStr = retStr + "&BOX65=" + getElById('BOX65').checked
    retStr = retStr + "&BOX66=" + getElById('BOX66').checked
    retStr = retStr + "&BOX67=" + getElById('BOX67').checked
    retStr = retStr + "&BOX68=" + getElById('BOX68').checked
    retStr = retStr + "&BOX69=" + getElById('BOX69').checked
    retStr = retStr + "&BOX70=" + getElById('BOX70').checked
    retStr = retStr + "&BOX71=" + getElById('BOX71').checked
    retStr = retStr + "&BOX72=" + getElById('BOX72').checked
    retStr = retStr + "&BOX73=" + getElById('BOX73').checked
    retStr = retStr + "&BOX74=" + getElById('BOX74').checked
    retStr = retStr + "&BOX75=" + getElById('BOX75').checked
    retStr = retStr + "&BOX76=" + getElById('BOX76').checked
    retStr = retStr + "&BOX77=" + getElById('BOX77').checked
    retStr = retStr + "&BOX78=" + getElById('BOX78').checked
    retStr = retStr + "&BOX79=" + getElById('BOX79').checked
    retStr = retStr + "&BOX80=" + getElById('BOX80').checked
    retStr = retStr + "&BOX81=" + getElById('BOX81').checked
    retStr = retStr + "&BOX82=" + getElById('BOX82').checked
    retStr = retStr + "&BOX83=" + getElById('BOX83').checked
    retStr = retStr + "&BOX84=" + getElById('BOX84').checked
    retStr = retStr + "&BOX85=" + getElById('BOX85').checked
    retStr = retStr + "&BOX86=" + getElById('BOX86').checked
    retStr = retStr + "&BOX87=" + getElById('BOX87').checked
    retStr = retStr + "&BOX88=" + getElById('BOX88').checked
    retStr = retStr + "&BOX89=" + getElById('BOX89').checked
    retStr = retStr + "&BOX90=" + getElById('BOX90').checked
    retStr = retStr + "&BOX91=" + getElById('BOX91').checked
    retStr = retStr + "&BOX92=" + getElById('BOX92').checked
    retStr = retStr + "&BOX93=" + getElById('BOX93').checked
    retStr = retStr + "&BOX94=" + getElById('BOX94').checked
    retStr = retStr + "&BOX95=" + getElById('BOX95').checked
    retStr = retStr + "&BOX96=" + getElById('BOX96').checked
    retStr = retStr + "&BOX97=" + getElById('BOX97').checked
    retStr = retStr + "&BOX98=" + getElById('BOX98').checked
    retStr = retStr + "&BOX99=" + getElById('BOX99').checked
    retStr = retStr + "&BOX100=" + getElById('BOX100').checked
    retStr = retStr + "&BOX101=" + getElById('BOX101').checked
    retStr = retStr + "&BOX102=" + getElById('BOX102').checked
    retStr = retStr + "&BOX103=" + getElById('BOX103').checked
    retStr = retStr + "&BOX104=" + getElById('BOX104').checked
    retStr = retStr + "&BOX105=" + getElById('BOX105').checked
    retStr = retStr + "&BOX106=" + getElById('BOX106').checked
    retStr = retStr + "&BOX107=" + getElById('BOX107').checked
    retStr = retStr + "&BOX108=" + getElById('BOX108').checked
    retStr = retStr + "&BOX109=" + getElById('BOX109').checked
    retStr = retStr + "&BOX110=" + getElById('BOX110').checked
    retStr = retStr + "&BOX111=" + getElById('BOX111').checked
    retStr = retStr + "&BOX112=" + getElById('BOX112').checked
    retStr = retStr + "&BOX113=" + getElById('BOX113').checked
    retStr = retStr + "&BOX114=" + getElById('BOX114').checked
    retStr = retStr + "&BOX115=" + getElById('BOX115').checked
    retStr = retStr + "&BOX116=" + getElById('BOX116').checked
    retStr = retStr + "&BOX117=" + getElById('BOX117').checked
    retStr = retStr + "&BOX118=" + getElById('BOX118').checked
    retStr = retStr + "&BOX119=" + getElById('BOX119').checked
    retStr = retStr + "&BOX120=" + getElById('BOX120').checked
    retStr = retStr + "&BOX121=" + getElById('BOX121').checked
    retStr = retStr + "&BOX122=" + getElById('BOX122').checked
    retStr = retStr + "&BOX123=" + getElById('BOX123').checked
    retStr = retStr + "&BOX124=" + getElById('BOX124').checked


    return retStr;

    }
    // If you are not using a frameset layout, this function will have to
    // change from reloading the right frame to reloading the self window
    function submitTreeForm() {
    window.open("demoCheckboxRightFrame.html?" + generateQueryString(), "basefrm")
    }
    </script>

    <title>Allocating Rights for Users [Language: Checkbox Tree JavasScript]</title>
    </head>

    <body topmargin=16 marginheight=16>
    <% int id=Integer.parseInt((String)request.getAttribute("id")) ;
    ResultSet result=(ResultSet)request.getAttribute("result");

    %>
    <input type=text name="id" size=4 value="<%=id%>" >
    <!-- Corporate users or any others that want to remove the next link should check
    the online FAQ for instructions on how to obtain a version without the link -->
    <!-- Removing this link will make the script stop from working -->
    <div style="position:absolute; top:0; left:0; "><table border=0><tr><td><font size=-2><a style="font-size:7pt;text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank>Javascript Tree Menu</a></font></td></tr></table></div>

    <!-- The form-related tags in this file are only needed for to demonstrate checkbox
    functionality. If your site will not display checkboxes, picka a different configuration file.
    -->
    <form name=ft method="">
    <BR><BR>
    <CENTER><input type=button onClick="submitTreeForm()" value="Get Values"></CENTER>

    <p align="right">

    <!-- Build the browser's objects and display default view of the
    tree. -->
    <script>initializeDocument()</script>

    <noscript>
    A tree for site navigation will open here if you enable JavaScript in your browser.
    </noscript>
    <BR><BR>
    </p>
    <CENTER><input type=button onClick="submitTreeForm()" value="Get Values"></CENTER>
    </form>
    </html>



    Bests,
    Keivan


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •