Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/27/2021 in all areas

  1. It can be whatever, as long as stuff exists in the way it needs to exist at the moment it needs to exist. So you can getElementById a variable, sure, but the thing you're trying to find has to be on the page - not just sitting in a variable you got from AJAX.
    1 point
  2. I think you've got your order of operations mixed up. The pear DIV is inside the AJAX's HTML, so right now you're trying to insert that HTML into itself. There's also nothing in there targeting the "apple" element. The pear DIV has to exist on the page for you to insert something into it. It should not be in the response itself but rather already on the page, and the response would be just the apple part.
    1 point
  3. composer install will install whatever the composer.lock file says to install. If there is no composer.lock file then it behaves like composer update does. composer update will parse the composer.json file and calculate all the dependencies based on the given requirements and current operating environment. Once it determines what versions to install and verified the platform requirements it will write the final configuration to composer.lock so that it's quick and easy to install all those dependencies again if needed. So if you move your project, including the composer.lock file, to a different platform and just run composer install then you could end up with compatibility issues because it might install the wrong dependencies for the platform. The reason for doing things this way rather than just always resolving dependencies is so you can install a known-good set of dependencies. If you just got the latest versions every time then 6 months from now when you want to install your application on a new server you might get an update version of some library that ends up not working rather than the working version you last tested with. Guzzle/promises for example recently released a new minor version that has a bug which broke one of my hobby projects. Had it been a real project being deployed somewhere it would have been very bad to have something like that happen. It's different in that you don't have to keep separate composer.phar files around. You can just have one that is kept up to date but run it with the appropriate PHP version. If you'd rather just have separate composer.phar files that's fine too.
    1 point
  4. You structure looks wrong to me. You have multiple form elements, each of which contains one select element with two option elements. I would expect there to be one form element, which contains one select element, which contains one or more option elements. echo( '<form method="POST">' ); echo( '<select name="inv">' ); if( mysqli_num_rows($result) ) { echo( '<option>' . $row["rizikos_lygis"] . '</option>' ); while( $row = mysqli_fetch_array($result) ) { printf( '<option value=\'%s\'>%s&nbsp;%s</option>' , $row["sugeneruoja"] , $row["pavadinimas"] , $row["sugeneruoja"] ); } } echo( '</select>' ); echo( '<input type="submit" name="submit" value="Apskaičiuoti">' ); echo( '</form>' ); Regards, Phill W.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.