SitePoint Sponsor

User Tag List

Results 1 to 1 of 1

Thread: checkbox

  1. #1
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Iran, Tehran
    0 Post(s)
    0 Thread(s)

    Angry checkbox select a group

    I have the following good source code which works fine. The result is a page with some checkboxes that their values come from a db.
    Now I would like to ask whether if I could change the style of checkboxes so that similar items that have the same root come togehter. What adjustments should I apply.

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

    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="keywords" >
    <meta name="description" >
    <link rel="stylesheet" type="text/css" href="images/style.css">
    <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
    <% if (request.getParameter("close")!=null) {%><script> window.close();</script><% } %>
    <table border="0" width="100%" id="table2" cellpadding="0" cellspacing="5">
    <td bgcolor="#FFFFFF" valign="bottom">
    <p align="center">
    <img border="0" src="images/farsititle.gif" align="bottom"><img border="0" src="images/logo_s.gif" width="47" height="36"></td>
    <font color="#808080">
    <% int id=(request.getAttribute("id")==null)?0:Integer.parseInt((String)request.getAttribute("id")) ;%>
    <span lang="fa">
    <table dir="rtl" id="table1" style="BORDER-COLLAPSE: collapse" bgcolor="White"
    borderColor="#ededed" cellSpacing="0" width="100%" border="1">
    <form action="doEdit" name=form1><input type="hidden" name="actionType" value="permissionsave"><input type="hidden" name="id" value="<%=id%>">
    <!-- Script -->
    function doSave(){




    <td vAlign="top" align="center" height="16" bgcolor="#92C9EB">
    <span lang="fa"><font face="Tahoma" size="4" color="#FFFFFF">عنوان</font></span></td>

    <span lang="fa">
    ResultSet result=(ResultSet)request.getAttribute("result");

    %><%int count=0;
    int I=0;
    int K=0;
    while( {%>

    <td align="left" height="16">
    <p dir="ltr">
    <font color="#808080">
    <span lang="fa">
    <input type=checkbox <%=(Permission.hasPermission(id,result.getInt("id")))?"checked":"" %> name="id<%=result.getString("id")%>" size="38" style="font-family: Tahoma; font-size: 11px; " dir="rtl"
    ></span></font><%=result.getString("name")%> (<%=result.getString("type_desc")%>) &nbsp;</font></font></span></td>
    <% } %>

    <td align="left" height="29">
    <p align="center"><font color="#808080">
    <a href="javascript:doSave();">
    <img height="25" src="images/i_save_b.gif" border="0"></a></font></td>



    <p align="center">&nbsp;</p>


    Last edited by borna; Jul 15, 2006 at 03:59. Reason: More clarify


Posting Permissions

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