ewtesterman@cox.net
May 5th, 2007, 04:33 AM
I am trying to build an Ajax site, (updating my programming professors page-last update was 96 lol) so far it is working pretty well. I have two issues I need to over come, but I think they are related.
1. I need to be able to make a call to load the initial content on the index page without using onLoad (it seems to render my other scripts useless)
2. when I update a div I would like to be able to update the nav bars as well (can I call more than one function in an href)
I have found some info on google, but nor really what I was looking for.
Basically I am trying to find away to automatically run these scripts when needed and I do not see how I can tie them to an event. Please don't beat me up all I have done before is C++, php, and assembly. In all of these running what I want when I want has never been an issue. Here is my index. page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Dr. Stockwell's Computer Science Home Page - Spring 2007</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="Bluefish 1.0.7">
<link rel="stylesheet" type="text/css" href="NiftyLayout.css" media="screen">
<script type="text/javascript" src="niftycube.js"></script>
<script type="text/javascript" src="niftyLayout.js"></script>
<script type="text/javascript" src="js/ajax-dynamic-content.js"></script>
<script type="text/javascript" src="js/ajax.js"></script>
<script type="text/javascript" src="js/events.js"></script>
</head>
<body>
<div id="header">
<h1>Dr. Stockwell's Computer Science Home Page</h1>
<div id="menu">
<ul id="nav">
<li id="home" class="activelink">
<a href="javascript:ajax_loadContent('content','home.html') ;">Home</a></li>
<li id="who">
<a href="javascript:ajax_loadContent('content','class.html' );">Classes</a></li>
<li id="prod">
<a href="javascript:ajax_loadContent('content','downloads.h tml');">Donwloads</a></li>
<li id="serv">
<a href="javascript:ajax_loadContent('content','grade.html' );">Grading Policy</a></li>
<li id="cont">
<a href="javascript:ajax_loadContent('content','contact.htm l');">Contact Me</a></li>
</ul>
</div>
</div>
<div id="container">
<div id="content">
<div class="comments">
</div>
</div>
<div id="side">
<p><img border="0" src="bill3.jpg"></p>
<P> </P>
<P></UL2></P>
<P><img border="0" src="msfree.gif"></P>
<P> </P>
</div>
<div id="footer">
<p><I><FONT size="2"><A name="DISCLAIMER">DISCLAIMER:</A> The University of Central
Oklahoma recognizes the value and potential of intellectual publishing on the
Internet, and so allows and encourages students, staff, and faculty to
experiment with producing individual academically based WWW pages. However, the
University can accept no responsibility for the contents of individual
homepages, be they organization, college, or personal. The views and opinions
expressed in individual pages are strictly those of the page authors, and
comments on the contents of those pages should be directed to the page authors.</FONT></I></p>
</div>
</div>
</body>
</html>
1. I need to be able to make a call to load the initial content on the index page without using onLoad (it seems to render my other scripts useless)
2. when I update a div I would like to be able to update the nav bars as well (can I call more than one function in an href)
I have found some info on google, but nor really what I was looking for.
Basically I am trying to find away to automatically run these scripts when needed and I do not see how I can tie them to an event. Please don't beat me up all I have done before is C++, php, and assembly. In all of these running what I want when I want has never been an issue. Here is my index. page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Dr. Stockwell's Computer Science Home Page - Spring 2007</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="Bluefish 1.0.7">
<link rel="stylesheet" type="text/css" href="NiftyLayout.css" media="screen">
<script type="text/javascript" src="niftycube.js"></script>
<script type="text/javascript" src="niftyLayout.js"></script>
<script type="text/javascript" src="js/ajax-dynamic-content.js"></script>
<script type="text/javascript" src="js/ajax.js"></script>
<script type="text/javascript" src="js/events.js"></script>
</head>
<body>
<div id="header">
<h1>Dr. Stockwell's Computer Science Home Page</h1>
<div id="menu">
<ul id="nav">
<li id="home" class="activelink">
<a href="javascript:ajax_loadContent('content','home.html') ;">Home</a></li>
<li id="who">
<a href="javascript:ajax_loadContent('content','class.html' );">Classes</a></li>
<li id="prod">
<a href="javascript:ajax_loadContent('content','downloads.h tml');">Donwloads</a></li>
<li id="serv">
<a href="javascript:ajax_loadContent('content','grade.html' );">Grading Policy</a></li>
<li id="cont">
<a href="javascript:ajax_loadContent('content','contact.htm l');">Contact Me</a></li>
</ul>
</div>
</div>
<div id="container">
<div id="content">
<div class="comments">
</div>
</div>
<div id="side">
<p><img border="0" src="bill3.jpg"></p>
<P> </P>
<P></UL2></P>
<P><img border="0" src="msfree.gif"></P>
<P> </P>
</div>
<div id="footer">
<p><I><FONT size="2"><A name="DISCLAIMER">DISCLAIMER:</A> The University of Central
Oklahoma recognizes the value and potential of intellectual publishing on the
Internet, and so allows and encourages students, staff, and faculty to
experiment with producing individual academically based WWW pages. However, the
University can accept no responsibility for the contents of individual
homepages, be they organization, college, or personal. The views and opinions
expressed in individual pages are strictly those of the page authors, and
comments on the contents of those pages should be directed to the page authors.</FONT></I></p>
</div>
</div>
</body>
</html>