From 97683e9b1ae7fae4d42846dcf7ec5c57dc450ac6 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Mon, 8 Dec 2025 13:06:17 -0500 Subject: [PATCH] Fix multi-printer selection bug in printer installer map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed VBScript Dim statements from inside while loop which caused re-declaration errors on subsequent iterations. Now uses standardized printer names directly from database instead of generating them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- printer_installer_map.asp | 53 ++------------------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/printer_installer_map.asp b/printer_installer_map.asp index 9506964..e5d9d74 100644 --- a/printer_installer_map.asp +++ b/printer_installer_map.asp @@ -241,57 +241,8 @@ var selectedPrinters = {}; image = "Versalink-C7125.png" end if - ' Generate standardized printer name using same logic as api_printers.asp - Dim cleanMachine, cleanModel, shortDescription, standardName - cleanMachine = Replace(machineName, " ", "") - cleanMachine = Replace(cleanMachine, "Machine", "") - cleanModel = Replace(modelnumber, " ", "") - - ' Extract short description from model number - If InStr(cleanModel, "ColorLaserJet") > 0 Then - shortDescription = "ColorLaserJet" - ElseIf InStr(cleanModel, "LaserJetPro") > 0 Then - shortDescription = "LaserJetPro" - ElseIf InStr(cleanModel, "LaserJet") > 0 Then - shortDescription = "LaserJet" - ElseIf InStr(cleanModel, "Altalink") > 0 Then - shortDescription = "Altalink" - ElseIf InStr(cleanModel, "Versalink") > 0 Then - shortDescription = "Versalink" - ElseIf InStr(cleanModel, "DesignJet") > 0 Then - shortDescription = "DesignJet" - Else - ' Extract model prefix before numbers - Dim i, char - shortDescription = "" - For i = 1 To Len(cleanModel) - char = Mid(cleanModel, i, 1) - If char >= "0" And char <= "9" Then - Exit For - End If - shortDescription = shortDescription & char - Next - If shortDescription = "" Then - shortDescription = cleanModel - End If - End If - - ' Build standard name: CSFName-Location-VendorModel (no dash between vendor and model) - If printercsfname <> "" And printercsfname <> "NONE" And printercsfname <> "gage lab " Then - If cleanMachine <> "" Then - standardName = printercsfname & "-" & cleanMachine & "-" & vendor & shortDescription - Else - standardName = printercsfname & "-" & vendor & shortDescription - End If - Else - If cleanMachine <> "" Then - standardName = cleanMachine & "-" & vendor & shortDescription - Else - standardName = "Printer" & printerid & "-" & vendor & shortDescription - End If - End If - - printerwindowsname = standardName + ' Use standardized name from database (no need to generate - names are now standardized) + printerwindowsname = rs("printerwindowsname") & "" %> (function() { var printerId = '<%Response.Write(printerid)%>';