logo
down
shadow

For loop for the first row, the button cant work


For loop for the first row, the button cant work

By : user2955862
Date : November 22 2020, 10:48 AM
it fixes the issue This is the table i created , so when i press the Edit button it should bring me to another page to edit. For the first edit button on the first row it does not work however for the rest of the edit button on the second row onward it works. Please help. Thank you ! , Try this:
code :
 <table border='1'>
     <tr>
         <th width='120'>Production ID</th>
         <th width='120'>Description</th>
         <th width='120'>BOM</th>
         </tr>
 <?php
    while ($fetch=mysqli_fetch_row($select)) {
      echo "<tr>
            <td>" . $fetch[0] . "</td>
            <td>" . $fetch[1] . "</td>
            <td>" . $fetch[2] . "</td>
            <td><form action='AddProductMainEdit.php' method='GET'><input type='hidden'  value='".$fetch[0]."' name='prodid'><input type='submit' id='edit' value='Edit'></form></td>
            </tr>";
    }
?>
 </table>


Share : facebook icon twitter icon
loop through radio button, function doesnt work

loop through radio button, function doesnt work


By : vasa abhishek
Date : March 29 2020, 07:55 AM
Hope that helps The document.getElementsByTagName function returns an array of all DOM elements that their tag name is equal to the given parameter (such as input, div, etc.). If you want to select elements by their name attribute, you should use document.getElementsByName instead.
code :
var selectedPica = document.getElementsByName('pica');
While loop GUI button won't work on second press

While loop GUI button won't work on second press


By : JiuZhi
Date : March 29 2020, 07:55 AM
I wish did fix the issue. In your bttnResetActionPerformed event handler, set keepShoppng back to true.
Otherwise, when your bttnCheckoutActionPerformed method is called, the loop while (keepShopping){ ... will never be entered again.
Next-Previous button to work in loop using Bootstrap Tab

Next-Previous button to work in loop using Bootstrap Tab


By : milano_10
Date : March 29 2020, 07:55 AM
will be helpful for those in need You can add a check of length with respect to prev and next and if it is present just continue with the normal thing else, toggle the last/first tabs respectively. Take a look at solution below and also go through comments:
code :
$('#wheel-left').on('click', function() {
    var prevLen = $tabs.filter('.active').prev('li').length; //check if prev li is present
    if (prevLen)
        $tabs.filter('.active').prev('li').find('a[data-toggle="tab"]').tab('show');//if yes then continue with normal tab switch
    else
        $tabs.filter('li:last').find('a[data-toggle="tab"]').tab('show');//else show the last tab
});

$('#wheel-right').on('click', function() {
    var nextLen = $tabs.filter('.active').next('li').length;//check if next li is present
    if (nextLen)
        $tabs.filter('.active').next('li').find('a[data-toggle="tab"]').tab('show');//if yes then continue with normal tab switch
    else
        $tabs.filter('li:first').find('a[data-toggle="tab"]').tab('show');//else show the first tab
});
click the generated button while loop does not work

click the generated button while loop does not work


By : ttvi
Date : March 29 2020, 07:55 AM
To fix this issue First, your Ids should be unique (as mentioned above). Leave them out or add a counter to it (better leave them out).
code :
$(".btplay").click(function () {
 <?php while($videolist = $resultvideos->fetch_array()){ ?>
      //...
 <?php } ?>
 <?php while($videolist = $resultvideos->fetch_array()): ?>
      //...
 <?php endwile; ?>
 <?php echo $videolist['miniatura'] ?>
 <?= $videolist['miniatura']; ?>
Trying to get the button input to work while a loop happening

Trying to get the button input to work while a loop happening


By : Dugan Dobbs
Date : March 29 2020, 07:55 AM
wish help you to fix your issue This is very hard to diagnose if you haven't provided any runtime errors. Assuming that your code is running fine without errors and that you have all the wires hooked up the right way (see https://pinout.xyz/ for connecting to the right header pins based on BCM value) then we check the code.
By the looks of it if you have the indentation the way it is, you have your if statement for button press outside an infinite loop (while True) and so it won't actually ever check to see if the button is pressed, as after it finishes going through the lights it'll just start again!
code :
import RPi.GPIO as GPIO
import time

# setup
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)

# LED setup and Button

red_led = 17  # bcm 17 = header pin 11
yellow_led = 27  # bcm 27 = header pin 13
green_led = 22  # bcm 22 = header pin 15
other_led = 23  # bcm 23 = header pin 16
button = 24  # bcm 24 = header pin 18

# GPIO output channel

GPIO.setup(red_led, GPIO.OUT)
GPIO.setup(green_led, GPIO.OUT)
GPIO.setup(yellow_led, GPIO.OUT)
GPIO.setup(other_led, GPIO.OUT)
GPIO.setup(button, GPIO.IN, pull_up_down = GPIO.PUD_UP)

# Run traffic light loop till button is pressed.
# Red=0, Green=1, Yellow=2

light = 0
def change_lights():
    global light, red_led, green_led, yellow_led
    light = (light+1)%3  # each call iterates one step through a 0,1,2 loop
    if light == 0:
        GPIO.output(red_led,GPIO.HIGH)
        GPIO.output(yellow_led,GPIO.LOW)
        GPIO.output(green_led,GPIO.LOW)
    elif light == 1:
        GPIO.output(red_led,GPIO.LOW)
        GPIO.output(yellow_led,GPIO.LOW)
        GPIO.output(green_led,GPIO.HIGH)
    elif light == 2:
        GPIO.output(red_led,GPIO.LOW)
        GPIO.output(yellow_led,GPIO.HIGH)
        GPIO.output(green_led,GPIO.LOW)

def button_pressed():
    global other_led
    for i in range(16):
        GPIO.output(other_led, GPIO.HIGH)
        time.sleep(.25)
        GPIO.output(other_led, GPIO.LOW)
        time.sleep(.25)

try:
    GPIO.output(red_led,GPIO.HIGH)
    while True:
        start_time = time.time()  # marks the current time
        # we now poll the current time at the same time as
        # polling to see if the button was pressed
        while time.time() < start_time+7:
            if (GPIO.input(button) == False):
                button_pressed()

        change_lights()  # we cycle to the next light

        start_time = time.time()  # reset the start time
        while time.time() < start_time+10:
            if (GPIO.input(button) == False):
                button_pressed()

        change_lights()  # we cycle to the next light

        start_time = time.time()  # reset the start time
        while time.time() < start_time+3:
            if (GPIO.input(button) == False):
                button_pressed()

        change_lights()  # we cycle to the next light

except KeyboardInterrupt:
    print("Reset Program")
finally:
    GPIO.cleanup()
Related Posts Related Posts :
  • Dynamic image for user's ID
  • How to only upload specific parts of HTML form with PHP?
  • Dynamic PHP string as MySQL table name
  • What is the error in my query?
  • PHP Upstart on Amazon EC2 Linux (Elasticbeanstalk)
  • how to print dynamic variable value in php
  • php mysql insert values and select
  • uploading image in codeigniter controller
  • Converting htaccess to nginx for counter
  • how can I show my signal transaction data as project name
  • php raspberry pi trying to change pi date
  • PHP and mysql, SELECT query return null
  • Unable to store Date values in php mysql table that are existing in excel file
  • Can we include 2 Mail() functions in 1 Page?
  • Problems with chinese characters
  • How to apply a function to every foreach result?
  • Use of CONCAT in FROM clause
  • Tag endpoint combined with user endpoint with Instagram API
  • create dynamic time in php and mysql
  • How to break zero index comma separated value into individual string in php
  • PHP Login session and echoing username
  • PHP : Difference b/w new self and new object()
  • Turkish character issue while inserting into MySQL database with PHP
  • Insert data from one DB into another on a different server - servers not linked
  • Sorting an array of strings using values alphabetically and considering the cases of values in PHP
  • Unable to solve .htaccess url rewriterule, gives 404 for all pages
  • Dual URL Rewrite In PHP
  • How to change value of cdata inside a .xml file and then again save it using php
  • Using filters from other classes within rules method in Yii 2?
  • json_decode syntax error from valid json
  • PHP get directory of included file on Virtualhost
  • RSA in php is confusing
  • Order in order without using events
  • How do I download a batch of pictures from URLs stored in a MySQL database
  • How to find pattern matching and save to array with preg_match
  • laravel4 data is not inserting in a single field
  • How can i merge Rows of An HTML table fetched from Mysql
  • How to get the duplicate values in array?
  • Add "."(dot) in a Numbers
  • Zend 2 multiple layouts for 1 module setup
  • PHP - Codeigniter : Uncaught exception 'PHPExcel_Reader_Exception' with message 'Could not open for reading, File does n
  • PHP Form Troubles
  • How to use if condition in my wordpress shortcode
  • Amazon S3 Data retrieval in URL for all the images in bucket
  • Convert Bangla date to standard English date
  • In Jquery how to redirect to another page?
  • Building an ecommerce site using Laravel: How do I view/route products based on their ID?
  • My kg and lbs conversion is always off by significant amount
  • How to use loop in comment section
  • Jqgrid with Datepicker
  • How to prevent opening an authenticated php web page?
  • phpexcel - Making file to download rather than saving in the server
  • Send radio box value with $_POST
  • Volley: How to extract JSONObject from String Response? Is it possible?
  • Adding Image to the Excel in phpexcel in php
  • Pass an array to Redirect::action in laravel
  • display file name in while loop without url
  • Snow by date php
  • How to Replace a value in SQL only to a certain extent
  • How do I use HTML & PHP forms to insert data into a database?
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org