First of all, in order to be in compliance with Dynamic Drive's Terms of Use, you need to include the credits for the Dynamic Drive scripts that you are using right in the source code of the page(s) that use them, ex:
Code:
<script type="text/javascript" src="js/dynamicajaxpage.js">
/***********************************************
* Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<script type="text/javascript" src="js/photo.js">
//*****************************************
// Blending Image Slide Show Script-
// © Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************
</script>
<script type="text/javascript" src="js/pollcont.js" ></script>
Not:
Code:
<script type="text/javascript" src="js/dynamicajaxpage.js"></script>
<script language="JavaScript1.1" src="js/photo.js"></script>
<script language="JavaScript1.1" src="js/pollcont.js" ></script>
as you currently have them.
Now, where you have:
Code:
<div id="contentarea">
<script type="text/javascript">ajaxpage('p_home.html', 'contentarea') //load "p_home.html" into "contentarea" DIV
</script>
<script language="JavaScript1.1" src="js/photo_show.js"></script>
</div>
Since you are loading the show with the page anyway, this would be better:
Code:
<div id="contentarea" style="display:none;"></div>
<div id="theShow"><img src="house_pics/rot_ocean.jpg" name="slide" border=0 style="filter:blendTrans(duration=3)">
<script type="text/javascript" src="js/photo_show.js"></script></div>
Once we've broken it up like that, we can do some simple display style manipulation as regards the Ajax stuff here:
Code:
<div id="globalNav">
<ul>
<li ><a href="javascript:ajaxpage('p_home.html', 'contentarea');">Home</a></li>
<li ><a href="javascript:ajaxpage('p_area.html', 'contentarea');">Area</a></li>
<li ><a href="javascript:ajaxpage('p_demo.html', 'contentarea');">Demographics</a></li>
<li ><a href="javascript:ajaxpage('p_loc.html', 'contentarea');">Location</a></li>
</ul>
</div>
Like so:
Code:
<script type="text/javascript">
function togShow(state){
document.getElementById('theShow').style.display=state? 'block' : 'none';
document.getElementById('contentarea').style.display=state? 'none' : 'block';
}
</script>
<div id="globalNav">
<ul>
<li ><a href="#" onclick="togShow(1);return false;">Home</a></li>
<li ><a href="#" onclick="ajaxpage('p_area.html', 'contentarea');togShow(0);return false;">Area</a></li>
<li ><a href="#" onclick="ajaxpage('p_demo.html', 'contentarea');togShow(0);return false;">Demographics</a></li>
<li ><a href="#" onclick="ajaxpage('p_loc.html', 'contentarea');togShow(0);return false;">Location</a></li>
</ul>
</div>
Bookmarks