Skip to content

WebCheatSheet

The easy way to know

  • PHP
  • HTML
  • JavaScript
  • SQL
  • ASP
  • MS Access Functions
  • SaaS
  • Email

Category: JavaScript

JavaScript

Call a Server Route from an HTML Button with Fetch

Sergey KornilovOctober 9, 2026

Use an HTML button and the Fetch API to send an item ID to a server route instead of trying to call a Python or PHP function directly from onclick.

JavaScript

Fix “prompt() Is Not Supported” in JavaScript

Sergey KornilovOctober 9, 2026

Run window.prompt in an actual browser page or replace it with an HTML input when the JavaScript host does not support browser dialogs.

JavaScript

Fill Missing JavaScript Array Values from the Previous Row

Sergey KornilovOctober 5, 2026

Carry the last known value forward for each field in a JavaScript array while preserving zero, false, and empty strings as valid data.

JavaScript

Run JavaScript After the DOM Is Ready

Sergey KornilovOctober 5, 2026

Use defer or DOMContentLoaded so JavaScript runs after the HTML it needs has been parsed, without waiting unnecessarily for every image and stylesheet.

JavaScript

Build URLs Safely with URL and URLSearchParams

Sergey KornilovOctober 4, 2026

Build JavaScript URLs with URL and URLSearchParams, use encodeURIComponent for individual path segments, and avoid encoding an assembled URL incorrectly.

JavaScript

Build Accessible Tabs with JavaScript

Sergey KornilovOctober 3, 2026

Create a tab interface that updates panels reliably and supports the ARIA roles, selected state, roving tabindex, and arrow-key behavior users expect.

JavaScript

Count Duplicate Values in a JavaScript Array

Sergey KornilovOctober 3, 2026

Count repeated values with a JavaScript Map, keep the result reusable, and convert it to a plain object only when an API or JSON output requires one.

JavaScript

Trace a JavaScript Error to Its Real Source

Sergey KornilovOctober 2, 2026

Use DevTools call stacks, source maps, script URLs, and extension isolation to identify whether a JavaScript error comes from your code or injected code.

JavaScript

Download Generated Text as a File with JavaScript

Sergey KornilovSeptember 26, 2026

Create a client-side text or CSV download with Blob, an object URL, the download attribute, UTF-8 handling, and timely URL cleanup.

JavaScript

Resize an Image Before Upload with JavaScript

Sergey KornilovSeptember 26, 2026

Resize a selected browser image with createImageBitmap and canvas, preserve aspect ratio, export a Blob, and upload the smaller file.

Posts navigation

Older posts

Recent Posts

  • Fix Local PHP Asset 404 Errors by Setting the Document Root
  • Call a Server Route from an HTML Button with Fetch
  • Fix “prompt() Is Not Supported” in JavaScript
  • Back Up SQL Server to a Network Share Without Access Denied Errors
  • Enable PHP Session Strict Mode and Regenerate IDs Safely

Recent Comments

  1. Build Accessible Tabs with JavaScript – WebCheatSheet on How to Control Tab Order in HTML
  2. Verify SQL Server Backups with CHECKSUM and VERIFYONLY – WebCheatSheet on Fix SQL Server ‘Insufficient Access Rights’ During Backup
  3. Get the Latest MySQL Value Before Two Dates – WebCheatSheet on SQL GROUP BY
  4. Count Duplicate Values in a JavaScript Array – WebCheatSheet on JavaScript Arrays
  5. Fix MySQL Error 1038 for Wide Rows and Filesort – WebCheatSheet on Determine the MySQL Version from the Command Line

Archives

  • October 2026
  • September 2026
  • August 2026
  • October 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022

Categories

  • ASP
  • Email
  • HTML
  • JavaScript
  • MS Access Functions
  • PHP
  • SaaS Architecture
  • SQL
  • Uncategorized
Copyright © 2026 WebCheatSheetFresh News by Ascendoor | Powered by WordPress.