I'm trying to change the data reference onap an object, but it's not working. Any idea what's wrong with the code?
<HEAD>
<script type="text/javascript">
function setContent(btn) {
alert("made it");
document.getElementById("Content").data = "Home/AboutUs.html";
return;
}
</script>
</HEAD>
<BODY>
<div>
<IMG src="images/Friends.gif" class="hdr" style="top:10px; left:10px;" alt='friends'>
<IMG src="images/Baseball.png" class="hdr" style="top:80px; left:50px;" alt='baseball'>
<IMG src="images/Bowling.png" class="hdr" style="top:80px; right:45px;" alt='bowling'>
<IMG src="images/Fishing.png" class="hdr" style="top:10px; right:10px;" alt='logo'>
<H1>Friends to Friends</H1>
<H2 id="Chapter"></H2>
</div>
<div class="main">
<div class="left">
<object id="Content" data="" width="100%" style="visibility:visible"></object>
</div>
<div class="right">
<button id="Home" class="HomeButton" onclick="setButton('Home')">Home</button>
<button id="SwPa" class="SwPaButton" onclick="setButton('SwPa')">Southwest Pa</button>
<button id="NwPa" class="NwPaButton" onclick="setButton('NwPa')">Northwest Pa</button>
<br clear=all>
<button id="link1" class="HomeButton" onclick="setContent('link1')"></button>
<button id="link2" class="HomeButton" onclick="setContent('link2')"></button>
<button id="link3" class="HomeButton" onclick="setContent('link3')"></button>
<button id="link4" class="HomeButton" onclick="setContent('link4')"></button>
<button id="link5" class="HomeButton" onclick="setContent('link5')"></button>
<button id="link6" class="HomeButton" onclick="setContent('link6')"></button>
</div>
</main>
</BODY>
</HTML>
Let all bear in mind that a society is judged not so much by the standards attained by its more affluent and privileged members as by the quality of life which it is able to assure for its weakest members.
<HEAD>
<script type="text/javascript">
function setContent(btn) {
alert("made it");
document.getElementById("Content").data = "Home/AboutUs.html";
return;
}
</script>
</HEAD>
<BODY>
<div>
<IMG src="images/Friends.gif" class="hdr" style="top:10px; left:10px;" alt='friends'>
<IMG src="images/Baseball.png" class="hdr" style="top:80px; left:50px;" alt='baseball'>
<IMG src="images/Bowling.png" class="hdr" style="top:80px; right:45px;" alt='bowling'>
<IMG src="images/Fishing.png" class="hdr" style="top:10px; right:10px;" alt='logo'>
<H1>Friends to Friends</H1>
<H2 id="Chapter"></H2>
</div>
<div class="main">
<div class="left">
<object id="Content" data="" width="100%" style="visibility:visible"></object>
</div>
<div class="right">
<button id="Home" class="HomeButton" onclick="setButton('Home')">Home</button>
<button id="SwPa" class="SwPaButton" onclick="setButton('SwPa')">Southwest Pa</button>
<button id="NwPa" class="NwPaButton" onclick="setButton('NwPa')">Northwest Pa</button>
<br clear=all>
<button id="link1" class="HomeButton" onclick="setContent('link1')"></button>
<button id="link2" class="HomeButton" onclick="setContent('link2')"></button>
<button id="link3" class="HomeButton" onclick="setContent('link3')"></button>
<button id="link4" class="HomeButton" onclick="setContent('link4')"></button>
<button id="link5" class="HomeButton" onclick="setContent('link5')"></button>
<button id="link6" class="HomeButton" onclick="setContent('link6')"></button>
</div>
</main>
</BODY>
</HTML>
Let all bear in mind that a society is judged not so much by the standards attained by its more affluent and privileged members as by the quality of life which it is able to assure for its weakest members.