Jump to content

Sheik88

Members
  • Content Count

    16
  • Joined

  • Last visited

Posts posted by Sheik88


  1. hi I would like to know how to make a field depend on another field, Example if i have a 2 drop down list for my products, defined as brands and model. i would like the to display only the models that are within the brand selected in the brand list


  2. HI i am trying to write a command to repeat a some cells. Is there any way to put the selected fields in a section and link that to my Java-script to repeat that region. I am able to do that function in HTML. I have added my code below please advise

    <HTML>
    <HEAD>
        <TITLE> Add/Remove dynamic rows in HTML table </TITLE>
     <SCRIPT language="javascript">
            function addRow(tableID) {
     
                var table = document.getElementById(tableID);
     
                var rowCount = table.rows.length;
                var row = table.insertRow(rowCount);
     
                var cell1 = row.insertCell(0);
                var element1 = document.createElement("input");
                element1.type = "checkbox";
                cell1.appendChild(element1);
     
                var cell2 = row.insertCell(1);
                cell2.innerHTML = rowCount + 1;
     
                var cell3 = row.insertCell(2);
                var element2 = document.createElement("input");
                element2.type = "text";
                cell3.appendChild(element2);
    			
    			var cell4 = row.insertCell(3);
                var element2 = document.createElement("input");
                element2.type = "text";
                cell4.appendChild(element2);
    			
    			var cell5 = row.insertCell(4);
                var element2 = document.createElement("input");
                element2.type = "text";
                cell5.appendChild(element2);
    			
    			var cell6 = row.insertCell(5);
                var element2 = document.createElement("input");
                element2.type = "text";
                cell6.appendChild(element2);
    			
    			
     
     
            }
     
            function deleteRow(tableID) {
                try {
                var table = document.getElementById(tableID);
                var rowCount = table.rows.length;
     
                for(var i=0; i<rowCount; i++) {
                    var row = table.rows[i];
                    var chkbox = row.cells[0].childNodes[0];
                    if(null != chkbox && true == chkbox.checked) {
                        table.deleteRow(i);
                        rowCount--;
                        i--;
                    }
     
     
                }
                }catch(e) {
                    alert(e);
                }
            }
     
        </SCRIPT>
    </HEAD>
    <BODY>
     
        <INPUT type="button" value="Add Row" onclick="addRow('dataTable')" />
     
        <INPUT type="button" value="Delete Row" onclick="deleteRow('dataTable')" />
     </br>
     <TABLE width="650px" border="1">
     <TR>
                <TD></TD>
                <TD>S/no</TD>
                <TD> Quantity </TD>
    			<TD> Description </TD>
    			<TD> Unit Price </TD>
    			<TD> Amount </TD>
    
            </TR>
    		</TABLE>
        <TABLE id="dataTable" width="300px" border="1">
            <TR>
                <TD><INPUT type="checkbox" name="chk"/></TD>
                <TD><div contenteditable> 1 </div></TD>
                <TD> <INPUT type="text" /> </TD>
    			<TD> <INPUT type="text" /> </TD>
    			<TD> <INPUT type="text" /> </TD>
    			<TD> <INPUT type="text" /> </TD>
    
            </TR>
        </TABLE>
     
    </BODY>
    </HTML>

  3. HI I would like to know how i can have restriction on apps. The structure will be like this

    -Administrator

    *department

    #department head

    --department user

    the different levels can have multiple user, there will be different departments , the heads and users will not be able to view data from different department. Only the administrator will be able to view all. Please advise. Thank you

×
×
  • Create New...