Posts

Showing posts with the label select

Retain dynamically submitted select options on form submit

Image
Clash Royale CLAN TAG #URR8PPP Retain dynamically submitted select options on form submit I have an html form with a dynamically populated select: <form action="/" method="post" onsubmit="beforeSubmit()" id="crypto_form"> <textarea name="message" id="textarea_message" oninput="this.value.toUpperCase()" cols="60" rows="5" placeholder="Enter Message"></textarea> <select form="crypto_form" name="keydata" id="select_keydata"></select> <button type="submit" name="type" id="btn_encrypt" value="encrypt">Encrypt</button> <button type="submit" name="type" id="btn_decrypt" value="decrypt">Decrypt</button> </form> The problem is that when I submit the form, all select values disappear. How do...

exclude status in dropdown list

Image
Clash Royale CLAN TAG #URR8PPP exclude status in dropdown list good day im trying to exclude all "Defective" in my column status in my "mobo" table and so far this code is not working. it's still showing everyting in my dropdown list: <?php $conn = new mysqli('localhost', 'root', 'admin2018', 'inventory') or die ('Cannot connect to db'); $result = $conn->query("select mobo, status FROM mobo WHERE NOT 'status = Defective'"); echo "<select name='mobo'>"; while ($row = $result->fetch_assoc()) { unset($id, $name); $id = $row['mobo']; $name = $row['mobo']; echo '<option value="'.$id.'">'.$name.'</option>'; } echo "</select>"; ?> 1 Answer 1 ...

How do I use buttons to select different elements from my document?

Image
Clash Royale CLAN TAG #URR8PPP How do I use buttons to select different elements from my document? I created a web page of my resume, which is organized by skills. At the top of the page, I have three buttons in the navigation: <p>Choose the type of experience you are interested in seeing:</p> <button class="button-w" type="button">Writing/Editing Experience</button> <button class="button-t" type="button">Teaching/Training Experience</button> <button class="button-c" type="button">Current Experience</button> I gave each corresponding section in the html document its own class. For example: to contain all my writing/editing experience. Then I wrote jquery to remove/detach all the other sections but the writing/editing. See below. It works for the first button I click on. But the problem is, when I then click on the "teaching/training experience" button, because I have a...