I used the .load() function. It works in Dreamweaver's Live View, but not in Firefox, Chrome, or IE.
Here is my HTML section:
<script src="js/jquery.js"></script>
<script src="tabsPull.js"></script>
<h1>Homework Assignments</h1>
<ul id="button-menu">
<li id="a1"><input class="no" type="button" onClick="ChangeActive(1)" value="Mon"></li>
<li id="a2"><input class="no" type="button" onClick="ChangeActive(2)" value="Tues/Wed"></li>
<li id="a3"><input c lass="no" type="button" onClick="ChangeActive(3)" value="Thurs/Fri"></li>
</ul>
<div id="tabInner" class="tabInner">
</div>
The ChangeActive() is in a separate JS file (tabsPull.js):
var active = 0
function ChangeActive(active){
if (active==1) {
document.getElementById("a1").className = "active";
document.getElementById("a2").className = "";
document.getElementById("a3").className = "";
$('#tabInner').load('http://axoplanner.weebly.com/monday.html #content');
} else if (active==2) {
document.getElementById("a2").className = "active";
document.getElementById("a1").className = "";
document.getElementById("a3").className = "";
$('#tabInner').load('http://axoplanner.weebly.com/tuesdaywednesday.html #content');
} else if (active==3) {
document.getElementById("a3").className = "active";
document.getElementById("a1").className = "";
document.getElementById("a2").className = "";
$('#tabInner').load('http://axoplanner.weebly.com/thursdayfriday.html #content');
}
}
What's the problem? It works in DW, but why not the browsers??? The reason I pull things from Weebly is because I need others to update it, and Weebly is easier.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…