From 810dda29a8f5570c7feee950e4e56907b8981d77 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Mon, 8 Dec 2025 15:21:17 -0500 Subject: [PATCH] Fix auto-populate: use attr() instead of data() for reliable reading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit jQuery's data() caches values; attr() reads directly from DOM 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- addprinter.asp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addprinter.asp b/addprinter.asp index 7bd8c03..216169c 100644 --- a/addprinter.asp +++ b/addprinter.asp @@ -328,10 +328,11 @@ var machineOption = $('#machineid option:selected'); var modelOption = $('#modelid option:selected'); - var vendor = modelOption.data('vendor') || ''; - var model = modelOption.data('model') || ''; - var machineAlias = machineOption.data('alias') || ''; - var machineNumber = machineOption.data('number') || ''; + // Use attr() instead of data() for reliable reading + var vendor = modelOption.attr('data-vendor') || ''; + var model = modelOption.attr('data-model') || ''; + var machineAlias = machineOption.attr('data-alias') || ''; + var machineNumber = machineOption.attr('data-number') || ''; // Only generate if we have model AND (machine OR CSF name) if (!vendor || (!csfName && !machineAlias && !machineNumber)) {