So, I'm working on an HTML based site using Image maps and I've created some in-line DIV's with buttons working.
I've been creating a second area that should launch Jquery to hide/show forms inside of a button, but For some reason the scripts do not work when launched via <script src="Domain.tld/script.js"></script>
But they do work when launched DIRECTLY into the code via <script>
Code here </script>
Below is the non working version to see the buttons you must click the THIRD button on the page.
<link rel="stylesheet" href="https://cronusdevelopment.github.io/IMVU/style.css" />
<link rel="stylesheet" href="https://cronusdevelopment.github.io/IMVU/shop.css" />
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cronusdevelopment.github.io/IMVU/frame.js"></script>
<script src="https://cronusdevelopment.github.io/IMVU/shop.js"></script>
<style>
table.imvuolstatuss {
color: white;
text-align: center;
font-size: 25px;
margin-left: 424px;
margin-top: -799px;
}</style>
<div id="content_container">
<div id="home">
<br /><br />
<p style="color: white;">HERE CONTENT FOR home</p>
</div>
<div id="about">
<br /><br />
<p style="color: white;">HERE CONTENT FOR about</p>
</div>
<div id="shop">
<br /><br />
<p style="color: white;">
<button id = "BtMale" class="ShopButtons">Male</button>
<button id = "BtFemale" class="ShopButtons">Female</button>
<button id = "BtFurn" class="ShopButtons">Room/Furn</button>
<button id = "BtOther" class="ShopButtons">Other</button>
<button id = "BtAll" class="ShopButtons" onclick=window.open("https://www.imvu.com/shop/web_search.php?manufacturers_id=196067881")>Whole Shop</button>
<form id="M" hidden>
<br>
<select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&manufacturers_id=196067881&sort=id&sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');">
<option value="" selected>Choose Something</option>
<option value="41">Clothing for Male</option>
<option value="71"> Male Accessories</option>
<option value="70"> Male Bottoms</option>
<option value="316"> Male Bundles</option>
<option value="92"> Male Eyebrows</option>
<option value="91"> Male Eyes</option>
<option value="98"> Male Gloves</option>
<option value="67"> Male Hairstyles</option>
<option value="296"> Male Heads</option>
<option value="102"> Male Shoes</option>
<option value="68"> Male Skintones</option>
<option value="69"> Male Tops</option>
<option value="3088-3091"> Male Outfits </option>
</select>
</form>
<form id="F" hidden>
<br>
<select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&manufacturers_id=196067881&sort=id&sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');">
<option value="" selected>Choose Something</option>
<option value="40">Clothing for Female</option>
<option value="153"> Female Accessories</option>
<option value="78"> Female Bottoms</option>
<option value="324"> Female Bundles</option>
<option value="90"> Female Eyebrows</option>
<option value="89"> Female Eyes</option>
<option value="97"> Female Gloves</option>
<option value="75"> Female Hairstyles</option>
<option value="295"> Female Heads</option>
<option value="101"> Female Shoes</option>
<option value="76"> Female Skintones</option>
<option value="128"> Female Tops</option>
<option value="3088-3090"> Female Outfits</option>
</select>
</form>
<form id="Rooms" hidden>
<br>
<select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&manufacturers_id=196067881&sort=id&sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');">
<option value="" selected>Choose Something</option>
<option value="107">Rooms & Furniture</option>
<option value="1027"> Furniture</option>
<option value="366"> Rooms</option>
<option value="1279"> Furniture Bundles</option>
<option value="2386"> Furnished Rooms</option>
<option value="107-1027-1552"> Posing Spots</option>
<option value="107-1027-1905"> Animated Pose Spots</option>
</select>
</form>
<form id="Other" hidden>
<br>
<select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&manufacturers_id=196067881&sort=id&sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');">
<option value="" selected>Choose Something</option>
<option value="108">Avatars</option>
<option value="425">Pets</option>
<option value="495">Stickers</option>
</select>
</form>
</p>
</div>
<div id="shout">
<br /><br />
<p style="color: white;">HERE CONTENT FOR shout</p>
</div>
<div id="honor">
<br /><br />
<p style="color: white;">HERE CONTENT FOR honor</p>
</div>
</div>
<div id="layout-container">
<img
src="https://i.imgur.com/vc0zoBl.png"
width="1013"
height="1300"
border="0"
usemap="#map"
/>
<map name="map">
<area
shape="rect"
coords="273,740,356,768"
onclick="changeframe('home','frame1')"
/>
<area
shape="rect"
coords="360,740,445,768"
onclick="changeframe('about','frame1')"
/>
<area
shape="rect"
coords="450,740,535,768"
onclick="changeframe('shop','frame1')"
/>
<area
shape="rect"
coords="539,740,624,768"
onclick="changeframe('shout','frame1')"
/>
<area
shape="rect"
coords="630,740,715,768"
onclick="changeframe('honor','frame1')"
/>
</map>
<div id="frame1" class="box"></div>
<script>
changeframe("home", "frame1");
</script>
</div>
<div id="OLStatus">
<table class="imvuolstatuss">
<tr>
<td align='center'>Status - <img src="https://gaf210.gafcodes.com/get_online_status?u=196067881&offline=https%3A%2F%2Fuserimages01.imvu.com%2Fproductdata%2Fstickers_af13a170f917065f15d41a7d6a484f37.gif&online=https%3A%2F%2Favatars.imvu.com%2Fcatalog%2Fweb_images%2Fmy_page%2Fonline_under_image.gif&unknown=https%3A%2F%2Favatars.imvu.com%2Fcatalog%2Fweb_images%2Fmy_page%2Fspace.gif" alt=""></td>
</tr>
</table>
</div>
below is the working version.
<link rel="stylesheet" href="https://cronusdevelopment.github.io/IMVU/shop.css" />
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<div id="shop">
<br /><br />
<p style="color: white;">
<button id = "BtMale" class="ShopButtons">Male</button>
<button id = "BtFemale" class="ShopButtons">Female</button>
<button id = "BtFurn" class="ShopButtons">Room/Furn</button>
<button id = "BtOther" class="ShopButtons">Other</button>
<!--DO NOT UNTAG THIS AS IT'S NOT NEEDED YET.-->
<!--<button id = "BtAll" class="ShopButtons" onclick=window.open("https://www.imvu.com/shop/web_search.php?manufacturers_id=196067881")>Whole Shop</button>-->
<form id="M" hidden>
<br>
<select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&manufacturers_id=196067881&sort=id&sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');">
<option value="" selected>Choose Something</option>
<option value="41">Clothing for Male</option>
<option value="71"> Male Accessories</option>
<option value="70"> Male Bottoms</option>
<option value="316"> Male Bundles</option>
<option value="92"> Male Eyebrows</option>
<option value="91"> Male Eyes</option>
<option value="98"> Male Gloves</option>
<option value="67"> Male Hairstyles</option>
<option value="296"> Male Heads</option>
<option value="102"> Male Shoes</option>
<option value="68"> Male Skintones</option>
<option value="69"> Male Tops</option>
<option value="3088-3091"> Male Outfits </option>
</select>
</form>
<form id="F" hidden>
<br>
<select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&manufacturers_id=196067881&sort=id&sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');">
<option value="" selected>Choose Something</option>
<option value="40">Clothing for Female</option>
<option value="153"> Female Accessories</option>
<option value="78"> Female Bottoms</option>
<option value="324"> Female Bundles</option>
<option value="90"> Female Eyebrows</option>
<option value="89"> Female Eyes</option>
<option value="97"> Female Gloves</option>
<option value="75"> Female Hairstyles</option>
<option value="295"> Female Heads</option>
<option value="101"> Female Shoes</option>
<option value="76"> Female Skintones</option>
<option value="128"> Female Tops</option>
<option value="3088-3090"> Female Outfits</option>
</select>
</form>
<form id="Rooms" hidden>
<br>
<select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&manufacturers_id=196067881&sort=id&sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');">
<option value="" selected>Choose Something</option>
<option value="107">Rooms & Furniture</option>
<option value="1027"> Furniture</option>
<option value="366"> Rooms</option>
<option value="1279"> Furniture Bundles</option>
<option value="2386"> Furnished Rooms</option>
<option value="107-1027-1552"> Posing Spots</option>
<option value="107-1027-1905"> Animated Pose Spots</option>
</select>
</form>
<form id="Other" hidden>
<br>
<select name="categories_id" onChange="window.open('http://www.imvu.com/shop/web_search.php?cat='+this.form.categories_id.value+'&manufacturers_id=196067881&sort=id&sortorder=desc','','scrollbars=yes, resizable=yes, status=1,toolbar=1, location=1, menubar=1');">
<option value="" selected>Choose Something</option>
<option value="108">Avatars</option>
<option value="425">Pets</option>
<option value="495">Stickers</option>
</select>
</form>
</p>
</div>
<script src="https://cronusdevelopment.github.io/IMVU/shop.js"></script>
below is the Javascript/Jquery for the above.
$('#BtMale').on('click', function(e){
$("#M").toggle();
$(this).toggleClass('Male');
if ($("#BtFemale").is(":enabled"))
$("#BtFemale").prop("disabled",true);
else
$("#BtFemale").prop("disabled",false);
if ($("#BtFurn").is(":enabled"))
$("#BtFurn").prop("disabled",true);
else
$("#BtFurn").prop("disabled",false);
if ($("#BtOther").is(":enabled"))
$("#BtOther").prop("disabled",true);
else
$("#BtOther").prop("disabled",false);
});
$('#BtFemale').on('click', function(e){
$("#F").toggle();
$(this).toggleClass('Female');
if ($("#BtMale").is(":enabled"))
$("#BtMale").prop("disabled",true);
else
$("#BtMale").prop("disabled",false);
if ($("#BtFurn").is(":enabled"))
$("#BtFurn").prop("disabled",true);
else
$("#BtFurn").prop("disabled",false);
if ($("#BtOther").is(":enabled"))
$("#BtOther").prop("disabled",true);
else
$("#BtOther").prop("disabled",false);
});
$('#BtFurn').on('click', function(e){
$("#Rooms").toggle();
$(this).toggleClass('Rooms');
if ($("#BtMale").is(":enabled"))
$("#BtMale").prop("disabled",true);
else
$("#BtMale").prop("disabled",false);
if ($("#BtFemale").is(":enabled"))
$("#BtFemale").prop("disabled",true);
else
$("#BtFemale").prop("disabled",false);
if ($("#BtOther").is(":enabled"))
$("#BtOther").prop("disabled",true);
else
$("#BtOther").prop("disabled",false);
});
$('#BtOther').on('click', function(e){
$("#Other").toggle();
$(this).toggleClass('Other');
if ($("#BtMale").is(":enabled"))
$("#BtMale").prop("disabled",true);
else
$("#BtMale").prop("disabled",false);
if ($("#BtFemale").is(":enabled"))
$("#BtFemale").prop("disabled",true);
else
$("#BtFemale").prop("disabled",false);
if ($("#BtFurn").is(":enabled"))
$("#BtFurn").prop("disabled",true);
else
$("#BtFurn").prop("disabled",false);
});
Any help would be greatly appreciated.