This scrpt isn't really setup to work that way. We can 'short circuit' it to force the random choice to work out to be the same index for each array. Add the following highlighted code as shown:
Code:
<script type="text/javascript">
/***********************************************
* Ajax Rotating Includes script- © 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
***********************************************/
//To include a page, invoke ajaxinclude(files_array, "ROTATETYPE") in the BODY of page.
//* file_array is the name of the array containing your list of files to include.
//* For "ROTATETYPE", valid values are "dailyw", "dailym", and "random", for each day of the week, each day of the month, and random, respectively.
//* Included file MUST be from the same domain as the page displaying it.
//Enter path to list of files to display.
//For rotatetype="dailyw", there must be 7 files, and for "dailym", 31 files. Otherwise, no restriction:
var includefiles=["file.html", "file2.html", "file3.html"]
var picfiles=["pic.html", "pic2.html", "pic3.html"]
;(function(){
if(includefiles.length !== picfiles.length){
alert('includefiles and picfiles Must Have the Same Number of Entries!');
return;
}
var index = Math.floor(Math.random() * includefiles.length);
includefiles = [includefiles[index]];
picfiles = [picfiles[index]];
})();
var rootdomain="http://"+window.location.hostname
function ajaxinclude(files_array, rotatetype){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XM . . .
About the rendering issue, ain't cross browser design fun? Anyways, you have a table for which you have specified a border attribute of 1. There is no standard as to what color that border must be. In order to create a visual contrast, the browser uses its best guess based upon what the surrounding colors are. The routines for this vary. Generally it will be OK, even if different. If you want a more consistent appearance, use style. Here's one way - give your table a class, for example:
Code:
<body>
<table class="displayTable" width="700" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
<td>&nb . . .
Now you may place a stylesheet in the head of the page (or add its rules to your existing stylesheet):
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.displayTable {
border-collapse: collapse;
border: 1px solid #fff;
}
.displayTable td {
border: 1px solid #fff;
}
</style>
<script type="text/javascript">
/***********************************************
* Ajax Rotating Includes . . .
Bookmarks