2024-02-02 02:52:59 +00:00
|
|
|
function updateIframes() {
|
2024-02-01 21:57:44 +00:00
|
|
|
const selectedFamily = familyDropdown.value;
|
|
|
|
const selectedMonster = monsterDropdown.value;
|
|
|
|
|
2024-02-02 02:52:59 +00:00
|
|
|
// Update monsterIframe src based on selected family and monster
|
2024-02-01 21:57:44 +00:00
|
|
|
const monsterIframeSrc = selectedMonster
|
|
|
|
? `/monster/${selectedMonster}`
|
|
|
|
: selectedFamily
|
2024-02-02 02:52:59 +00:00
|
|
|
? `/monster/${selectedFamily}`
|
|
|
|
: "about:blank";
|
|
|
|
|
|
|
|
monsterIframe.src = monsterIframeSrc;
|
2024-02-01 21:57:44 +00:00
|
|
|
|
2024-02-02 02:52:59 +00:00
|
|
|
// Update breedingIframe src based on the selected monster
|
2024-02-01 21:57:44 +00:00
|
|
|
const breedingIframeSrc = selectedMonster
|
2024-02-02 15:37:07 +00:00
|
|
|
? `/breeds?monster=${selectedMonster}`
|
2024-02-01 21:57:44 +00:00
|
|
|
: "about:blank";
|
|
|
|
|
2024-02-02 02:52:59 +00:00
|
|
|
breedingIframe.src = breedingIframeSrc;
|
|
|
|
}
|