Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 16, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 16, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 16, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 16, 2025

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025

      Minecraft licensing robbed us of this controversial NFL schedule release video

      May 16, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The power of generators

      May 16, 2025
      Recent

      The power of generators

      May 16, 2025

      Simplify Factory Associations with Laravel’s UseFactory Attribute

      May 16, 2025

      This Week in Laravel: React Native, PhpStorm Junie, and more

      May 16, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025
      Recent

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»CodeSOD: Location Chooser

    CodeSOD: Location Chooser

    August 1, 2024

    Today’s anonymous submitter inherited an application with a huge list of bugs and feature requests for missing features. While tracking down a bug, our submitter learned a lot about why “Allow additional stores to be viewable in the store selector,” was an unimplemented feature.

    if (inv.inv_storeloc == 0) {
    out.println(“<option selected value=”0″>Select</option>”);
    out.println(“<option value=”1″>Location 1</option>”);
    out.println(“<option value=”2″>Location 2</option>”);
    } else if (inv.inv_storeloc == 1) {
    out.println(“<option selected value=”1″>Location 1</option>”);
    out.println(“<option value=”2″>Location 2</option>”);
    } else {
    out.println(“<option value=”1″>Location 1</option>”);
    out.println(“<option selected value=”2″>Location 2</option>”);
    }

    If the user has not selected a store, we will output three options, selecting the first one- a prompt to select a store. If they have selected store 1, we output two options, with store one selected. Otherwise, we output two options with store two selected.

    This has a little of everything. No real understanding of how to apply the selected attribute with a loop and conditionals. Hard coded HTML strings in the back end code. Hard coded store names which will be great if our business expands (or contracts).

    I suspect the list of missing features isn’t going to get much shorter, and the list of bugs is only going to get longer.

    [Advertisement]
    BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleInterop 2024: Chrome at 100% for the accessibility focus area
    Next Article Visualize Work Hours Easily – React Daily TimeLine Sheet

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 16, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-47916 – Invision Community Themeeditor Remote Code Execution

    May 16, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    JPEG Archive – utilities for archive JPEGs for long term storage

    Linux

    CVE-2025-3872 – Centreon centreon-web SQL Injection

    Common Vulnerabilities and Exposures (CVEs)

    Network Optimization with AI: Exploring Predictive Maintenance and Traffic Management

    Development

    Understanding how certain database parameters impact scaling in Amazon Aurora Serverless v2

    Databases

    Highlights

    Android Show: Google to Unveil OS Future Before I/O 2025

    April 29, 2025

    Android Show: Google to Unveil OS Future Before I/O 2025

    Ahead of the Google I/O 2025 conference, scheduled to commence on May 20th (Pacific Time), Google will host a special edition “Android Show” event on May 13th at 1 PM Eastern Time to unveil the future …
    Read more

    Published Date:
    Apr 29, 2025 (5 hours, 37 minutes ago)

    Vulnerabilities has been mentioned in this article.

    CVE-2022-26006

    CVE-2022-21198

    2024 Webflow Conf Schedule is Here!

    August 22, 2024

    Building AI With MongoDB: Integrating Vector Search And Cohere to Build Frontier Enterprise Apps

    April 25, 2024

    Synology Network File System Vulnerability Let Read Any File

    April 23, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.