I have a few selector buttons in a Hype document. They have worked fine for four years until a month or so ago. I now get the following error, "TypeError: undefined is not an object (evaluating 'window.myhypedocument.showSceneNamed')"
I have checked for plugin conflicts and everything is up to date. Could it be something to do with the JS update last month?
You can see it at Fire Sprinkler Saves Interactive Map Test – Northern Illinois Fire Sprinkler Advisory Board
Here is the code:
<form name="jump8">
<select name="menu" id="buildingmenu2023" style="font-size : 16px; color: white; background: #4b6bb3;">
<option value="#">BUILDING TYPE 2023</option>
<option value="RESIDENTIAL2023">RESIDENTIAL</option>
<option value="One- or Two-Family Home2023">-- One- or Two-Family Home</option>
<option value="Townhouse2023">-- Townhouse</option>
<option value="Multifamily (condo/apartment)2023">-- Multifamily (condo/apartment)</option>
<option value="Institutional2023">-- Institutional</option>
<option value="EDUCATION2023">EDUCATION</option>
<option value="COMMERCIAL/INDUSTRIAL2023">COMMERCIAL/INDUSTRIAL</option>
<option value="Retail2023">-- Retail</option>
<option value="Office2023">-- Office</option>
<option value="Healthcare2023">-- Healthcare</option>
<option value="Lodging2023">-- Lodging</option>
<option value="Warehouse2023">-- Warehouse</option>
<option value="Manufacturing2023">-- Manufacturing</option>
<option value="Food Service/Sales2023">-- Food Service/Sales</option>
<option value="Assembly2023">-- Assembly</option>
<option value="Other2023">-- Other</option>
<option value="HIGH-RISE2023">HIGH-RISE</option>
<option value="HR Residential2023">-- Residential</option>
<option value="Commercial2023">-- Commercial</option>
<option value="PARKING GARAGE2023">PARKING GARAGE</option>
</select>
<input type="button" id="gobutton20232" onclick="window.myhypedocument.showSceneNamed(document.jump8.menu.options[document.jump8.menu.selectedIndex].value);jump9.reset()" value="GO" style="display:none;">
</form>
<script>
document.querySelector("#buildingmenu2023").addEventListener('change', function() {
document.querySelector("#gobutton20232").dispatchEvent(new Event("click"));
});e
</script>