Thanks Big-K, for giving me a clue on this one!
I did as you suggested and downloaded Ajax from Sourceforge and I got the glm-ajax.js file.
Here's what I then did...
- created a folder in my site root called "script" and moved the glm-ajax.js to there.
Followed your guides, putting the content you gave into one cell of a table on a basic new page.
So it looks like this:
Quote:
<HTML>
<HEAD>
<SCRIPT language="JavaScript" src="script/glm-ajax.js"></SCRIPT>
<TITLE>WAFFLE</TITLE>
<BODY>
<TABLE>
<TR>
<TD>
<script type="text/javascript">
var ajax = new GLM.AJAX();
function populate1(content){
td = document.getElementById('td1');
td.innerHTML = content;
}
ajax.callPage("p1.htm", populate1);
</script>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
|
I then created a web page called p1.htm with a simple text message in it.
Sadly, opening this in IE I see nothing returned. I guess I'm being thick... can you advise please?
I suspect I'm not fully appreciating the use of td and 'td1' and td.innerHTML.
Once this is sorted, will there be a way to randomise the page displayed in the cell of the table.
In otherwords, with 4 pages available (let's call them p1.htm to p4.htm), I'd like to have a random choice of p1 to p4 loaded into the cell on a page load or refresh, kind of idea.
Hope I'm making sense!
Best regards
Chris