Jump to content
Larry Ullman's Book Forums

Abhay_R

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Abhay_R

  • Rank
    Newbie
  1. Hi HartleySan, Actually in three separate div common 1 to 20 data retrieve from database so all three div have same 1 to 20 data . my moto in all three div same data so all row also same in three div . So if first row select in first div then same first row hidden of other two div . So user if select one data then user can't select same data in other two box . its help to restriction to select same data in different different div
  2. Thanku HartleySan . Brother can you explain with example
  3. When checkbox is checked, disable other checkboxes Question : 1.When one particular value checkbox is checked out of many checkbox in 1st div then disable same value checkbox in 2nd and 3rd div 2.When one particular value checkbox is checked out of many checkbox in 2nd div then disable same value checkbox in 1st and 3rd div 3.When one particular value checkbox is checked out of many checkbox in 3rd div then disable same value checkbox in 1st and 3rd div How can we do this with javascript or J query
  4. Hi Larry we do same thing with check box also so can you help me how can do that with three div where all input="checkbox". as per your suggestion i am not using radio i am using checkbox but how can design code where one or multiple employee name select in one div that will disable in other two div also
  5. Hi Larry we do same thing with check box also so can you help me how can do that with three div where all input="checkbox". as per your suggestion i am not using radio i am using checkbox but how can design code where one or multiple employee name select in one div that will disable in other two div also
  6. Hi Larry I am create first php page for UI . Second page create where I write SQL Query and Through Ajax call Second page in first page . Now i am doing one project where in UI have Three div and each div have 20 checkbox which is coming by Second Page where we call data through sql query in loop so 20 time data retreive and print in all Three div . Now main thing is all three div have 20 check box for same employee name . Now condition is if first div user select any employee name checkbox then same name of checkbox disable in other two div check box . so same name not repeat this is aim . I am trying to put different id for all three <input id=" "> but its not work . In Sr.no 3 where is use input = " checkbox" rest becaause we need multiple employee selection in one div anther two div show input="radio" because we want to select only one name .Now i want in one div where input ="checkbox" where i select 2 employee name then same name disable another two div but one input is check box and another two div input ="radio" and each div have different id so how can do with radio and checkbox . for why i So could you help me is their possible to put Input id Diiffernt or same .Below my code 1. UI Page where we print All three Sepreate div with 20 checkbox. <div class="col-sm-4"> <div class="form-group ui-widget" id="reviewerdiv"> ////<- this id retrieve data from Second page while using Ajax </div> </div> <div class="col-sm-4"> <div class="form-group ui-widget" id="primarydiv">////<- this id retrieve data from Second page while using Ajax </div> </div> <div class="col-sm-4"> <div class="form-group ui-widget" id="secondarydiv">////<- this id retrieve data from Second page while using Ajax </div> </div> 2. Ajax code: function getSecondary() { var ajaxRequest; // The variable that makes Ajax possible! try { // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); }catch (e) { // Internet Explorer Browsers try { ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); }catch (e) { try { ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); }catch (e) { // Something went wrong alert("Your browser broke!"); return false; } } } // Create a function that will receive data // sent from the server and will update // div section in the same page. ajaxRequest.onreadystatechange = function() { if(ajaxRequest.readyState == 4) { var ajaxDisplay = document.getElementById('secondarydiv'); ajaxDisplay.innerHTML = ajaxRequest.responseText; RequiredSecondry(); } } // Now get the value from user and pass it to // server script. ajaxRequest.open("GET", "PopulateEmployee.php?name=<?php echo $name; ?>&secondaryname=true", true); ajaxRequest.send(null); } ////////for Primary function getPrimary() { var ajaxRequest; // The variable that makes Ajax possible! try { // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); }catch (e) { // Internet Explorer Browsers try { ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); }catch (e) { try { ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); }catch (e) { // Something went wrong alert("Your browser broke!"); return false; } } } // Create a function that will receive data // sent from the server and will update // div section in the same page. ajaxRequest.onreadystatechange = function() { if(ajaxRequest.readyState == 4) { var ajaxDisplay = document.getElementById('primarydiv'); ajaxDisplay.innerHTML = ajaxRequest.responseText; RequiredPrimary(); } } // Now get the value from user and pass it to // server script. ajaxRequest.open("GET", "PopulateEmployee.php?name=<?php echo $name; ?>&primaryname=true", true); ajaxRequest.send(null); } /////// for reviewer function getReviewer() { var ajaxRequest; // The variable that makes Ajax possible! try { // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); }catch (e) { // Internet Explorer Browsers try { ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); }catch (e) { try { ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); }catch (e) { // Something went wrong alert("Your browser broke!"); return false; } } } // Create a function that will receive data // sent from the server and will update // div section in the same page. ajaxRequest.onreadystatechange = function() { if(ajaxRequest.readyState == 4) { var ajaxDisplay = document.getElementById('reviewerdiv'); ajaxDisplay.innerHTML = ajaxRequest.responseText; RequiredReviewer(); } } // Now get the value from user and pass it to // server script. ajaxRequest.open("GET", "PopulateEmployee.php?name=<?php echo $name; ?>&reviewername=true", true); ajaxRequest.send(null); } 3. Second page where i write sql query with inside print of retrieve <?php $sql = "SELECT * FROM employee WHERE email NOT IN (SELECT boss.email FROM boss) AND email NOT IN (SELECT deactivatedemployee.employee FROM deactivatedemployee)"; $resultset = $connection->query($sql); if(!$resultset) { die('Could not get data: ' . $connection->error); } else { if(isset($_GET['secondaryname'])) { echo "<label class=\"label6\" for=\"tasksecondary\">Secondary Responsible:</label>"; //echo "<select class=\"form-control form-theme\" multiple=\"multiple\" name=\"tasksecondary[]\ id=\"tasksecondary\" required>"; echo "<div class=\"form-theme form-scroll\" id=\"secondryPerson\" style=\"height: 88px;width: 100%;overflow: auto;padding: 0px 20px;\">"; echo "<input id=\"searchsecond\" class=\"searchtheme\"; type=\"text\" placeholder=\"Search...\" autocomplete=\"off\">"; while ($row = $resultset->fetch_array(MYSQLI_ASSOC)) { //echo "<option value=\"{$row['email']}\">{$row['name']}</option>"; echo "<div><input type=\"checkbox\" name=\"tasksecondary[]\ id=\"tasksecondary\" value=\"{$row['email']}\" >"; echo "<span>".$row['name']."</span>"."</div>"; } echo "</div>"; } else if(isset($_GET['primaryname'])){ echo "<label class=\"label6\" for=\"taskprimary\">Primary Responsible:</label>"; //echo "<select class=\"form-control form-theme\" multiple=\"multiple\" name=\"tasksecondary[]\ id=\"tasksecondary\" required>"; echo "<div class=\"form-theme form-scroll\" id=\"primaryPerson\" style=\"height: 88px;width: 100%;overflow: auto;padding: 0px 20px;\">"; echo "<input id=\"searchprimary\" class=\"searchtheme\"; type=\"text\" placeholder=\"Search...\" autocomplete=\"off\">"; while ($row = $resultset->fetch_array(MYSQLI_ASSOC)) { //echo "<option value=\"{$row['email']}\">{$row['name']}</option>"; //echo "<div ><input type=\"radio\" name=\"taskprimary[]\ id=\"taskprimary\" value=\"{$row['email']}\" >"; echo "<div ><input type=\"radio\" name=\"taskprimary[]\ id=\"taskprimary\" value=\"{$row['email']}\" >"; echo"<span>".$row['name']."</span>"."</div>"; } echo "</div>"; }else if(isset($_GET['reviewername'])){ echo "<label class=\"label6\" for=\"taskreviewer\">Reviewer Responsible:</label>"; //echo "<select class=\"form-control form-theme\" multiple=\"multiple\" name=\"tasksecondary[]\ id=\"tasksecondary\" required>"; echo "<div class=\"form-theme form-scroll\" id=\"reviewerPerson\" style=\"height: 88px;width: 100%;overflow: auto;padding: 0px 20px;\">"; echo "<input id=\"searchreviewer\" class=\"searchtheme\"; type=\"text\" placeholder=\"Search...\" autocomplete=\"off\" >"; while ($row = $resultset->fetch_array(MYSQLI_ASSOC)) { //echo "<option value=\"{$row['email']}\">{$row['name']}</option>"; //echo "<div><input type=\"radio\" name=\"taskreviewer[]\ id=\"taskreviewer\" value=\"{$row['email']}\" >"; echo "<div><input type=\"radio\" name=\"taskreviewer[]\ id=\"taskreviewer\" value=\"{$row['email']}\" >"; echo"<span>".$row['name']."</span>"."</div>"; } echo "</div>"; } } ?>
  7. Unable to disable radio button which is already selected in another div. Through ajax we cal database information in PHP UI page 1. PHP Ui page where we can print data from database using ajax <div class="col-sm-4"> <div class="form-group ui-widget" id="primarydiv"> </div> </div> <div class="col-sm-4"> <div class="form-group ui-widget" id="seconddiv"> </div> </div> <div class="col-sm-4"> <div class="form-group ui-widget" id="thirddiv"> </div> </div> 2. we create sql.php page where we just write sql query while ($row = $resultset->fetch_array(MYSQLI_ASSOC)) { //echo "<option value=\"{$row['email']}\">{$row['name']}</option>"; echo "<div><input type=\"radio\" class=\"Checkboxes4\" name=\"taskprimary[]\ id=\"empname\" value=\"{$row['email']}\" >"; echo"<span>".$row['name']."</span>"."</div>"; } #imp is Now same database value we print into differentt differnt three div . So in PHP UI page three div create who carry same data. Now problem is when user if select any radio button then same value will be disable into other two div also
  8. My Question is : if I have three div where i am print same value from database in three div in radio button format . And database value count is 20 . So all three div have 20 value of radio button . so i am using while loop for like below while ($row = $resultset->fetch_array(MYSQLI_ASSOC)) { //echo "<option value=\"{$row['email']}\">{$row['name']}</option>"; echo "<div><input type=\"radio\" class=\"Checkboxes4\" name=\"taskprimary[]\ id=\"taskprimary\" value=\"{$row['email']}\" >"; echo"<span>".$row['name']."</span>"."</div>"; } and print that value in Three div in html page a.Print 20value in radio format html page in first div <div class="col-sm-4"> <div class="form-group ui-widget" id="firstdiv"> </div> </div> b.Print 20value in radio format data in html page in second div <div class="col-sm-4"> <div class="form-group ui-widget" id="seconddiv"> </div> </div> c.Print 20value in radio format data in html page in third div <div class="col-sm-4"> <div class="form-group ui-widget" id="thirddiv"> </div> </div> Now i am trying if i select any radio button value out of 20 value in first div then same matching value will be disable in other two div ( in Second div and third div ) .My aim is we have three div like primary , secondary and reviewer and all three div have all employee name of company including executive and managers which come from database and print in loop . So any one one select primary employee for task then that employee not show in Secondary person list as well as primary person not show in Reviewer person . So if anyone can help me in this then its great for me
  9. Thanku HartleySan . If You don't mine I am asking another question related same field Question: if I have three div where i am print same value from database in three div in radio button format . And database value count is 20 so i am using while loop for like below while ($row = $resultset->fetch_array(MYSQLI_ASSOC)) { //echo "<option value=\"{$row['email']}\">{$row['name']}</option>"; echo "<div><input type=\"radio\" class=\"Checkboxes4\" name=\"taskprimary[]\ id=\"taskprimary\" value=\"{$row['email']}\" >"; echo"<span>".$row['name']."</span>"."</div>"; } and print that value in one div in html page <div class="col-sm-4"> <div class="form-group ui-widget" id="primarydiv"> </div> </div> Now I am trying if anyone select one radio button of first div then that same value of radio button is disable in other two div also . HartleySan or anyone can help me in this
  10. Can anyone help me if retrieve value from database and store into input type="checkbox" in while loop . so 20 checkbox create with value so when in UI if we select one check box then rest of all value will be disable ? any one can help me in this ... 1.First my code where i store sql data if(isset($_GET['primaryname'])){ echo "<label class=\"label6\" for=\"taskprimary\">Primary Responsible:</label>"; //echo "<select class=\"form-control form-theme\" multiple=\"multiple\" name=\"tasksecondary[]\ id=\"tasksecondary\" required>"; echo "<div class=\"form-theme form-scroll\" id=\"primaryPerson\" style=\"height: 88px;width: 100%;overflow: auto;padding: 0px 20px;\">"; echo "<input id=\"searchprimary\" class=\"searchtheme\"; type=\"text\" placeholder=\"Search...\" autocomplete=\"off\">"; while ($row = $resultset->fetch_array(MYSQLI_ASSOC)) { //echo "<option value=\"{$row['email']}\">{$row['name']}</option>"; echo "<div id=\"tblFruits\"><label class=\"checkbox-inline\"><input type=\"checkbox\" class=\"Checkboxes4\" name=\"taskprimary[]\ id=\"taskprimary\" value=\"{$row['email']}\" >"; echo"<span>".$row['name']."</span>"."</label></div>"; } echo "</div>"; 2.i am calling that id through ajax 3. in ajax my html page div id i mentation <div class="col-sm-4"> <div class="form-group ui-widget" id="primarydiv"> </div> </div>
×
×
  • Create New...