Javascript on IPB

Beer $lut

BattleForums Senior Member
Joined
Oct 21, 2003
Messages
2,878
Reaction score
0
Location
teds pants
The test links on the banner at this forum here http://flaminmoes.thekrazykennyshow.net/forum/ is suppose to be rollovers and the javascript doesnt seem to be working. Heres the forum wrapper.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title><% TITLE %></title> 
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<SCRIPT TYPE="text/javascript">
<!--

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		help_over = newImage("images/help-over.gif");
		search_over = newImage("images/search-over.gif");
		search_help_over = newImage("images/search-help_over.gif");
		members_search_over = newImage("images/members-search_over.gif");
		members_over = newImage("images/members-over.gif");
		calendar_members_over = newImage("images/calendar-members_over.gif");
		calendar_over = newImage("images/calendar-over.gif");
		preloadFlag = true;
	}
}

// -->
</SCRIPT>

<% GENERATOR %> 
<% CSS %> 
<% JAVASCRIPT %> 

</head> 
<body>
<TABLE WIDTH=993 BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD ROWSPAN=2>
			<IMG SRC="images/bannerleft.gif" WIDTH=691 HEIGHT=110 ALT=""></TD>
		<TD COLSPAN=4>
			<IMG SRC="images/bannerright.gif" WIDTH=302 HEIGHT=85 ALT=""></TD>
	</TR>
	<TR>
		<TD>
			<A HREF="http://flaminmoes.thekrazykennyshow.net/forum/index.php?act=Help"
				ONMOUSEOVER="changeImages('help', 'images/help-over.gif', 'search', 'images/search-help_over.gif'); return true;"
				ONMOUSEOUT="changeImages('help', 'images/help.gif', 'search', 'images/search.gif'); return true;">
				<IMG NAME="help" SRC="images/help.gif" WIDTH=48 HEIGHT=25 BORDER=0 ALT=""></A></TD>
		<TD>
			<A HREF="http://flaminmoes.thekrazykennyshow.net/forum/index.php?act=Search&f="
				ONMOUSEOVER="changeImages('search', 'images/search-over.gif', 'members', 'images/members-search_over.gif'); return true;"
				ONMOUSEOUT="changeImages('search', 'images/search.gif', 'members', 'images/members.gif'); return true;">
				<IMG NAME="search" SRC="images/search.gif" WIDTH=64 HEIGHT=25 BORDER=0 ALT=""></A></TD>
		<TD>
			<A HREF="http://flaminmoes.thekrazykennyshow.net/forum/index.php?act=Members"
				ONMOUSEOVER="changeImages('members', 'images/members-over.gif', 'calendar', 'images/calendar-members_over.gif'); return true;"
				ONMOUSEOUT="changeImages('members', 'images/members.gif', 'calendar', 'images/calendar.gif'); return true;">
				<IMG NAME="members" SRC="images/members.gif" WIDTH=88 HEIGHT=25 BORDER=0 ALT=""></A></TD>
		<TD>
			<A HREF="http://flaminmoes.thekrazykennyshow.net/forum/index.php?act=calendar"
				ONMOUSEOVER="changeImages('calendar', 'images/calendar-over.gif'); return true;"
				ONMOUSEOUT="changeImages('calendar', 'images/calendar.gif'); return true;">
				<IMG NAME="calendar" SRC="images/calendar.gif" WIDTH=102 HEIGHT=25 BORDER=0 ALT=""></A></TD>
	</TR>
</TABLE>
<% MEMBER BAR %> 
<div id="ipbwrapper">
<% NAVIGATION %> 
<% BOARD %> 
<% STATS %> 
<% COPYRIGHT %>
</div>
</body> 
</html>
 

x42bn6

Retired Staff
Joined
Nov 11, 2002
Messages
15,150
Reaction score
2
Location
London, United Kingdom
*cringes badly*

document[changeImages.arguments].src = changeImages.arguments[i+1];

Dude, document has no indexes! I think it's meant to be:

document.images[changeImages.arguments].src = changeImages.arguments[i+1];
 

Beer $lut

BattleForums Senior Member
Joined
Oct 21, 2003
Messages
2,878
Reaction score
0
Location
teds pants
i think that might do it, hold on

edit: Yes it did, I love you x42.
 

Teddy

BattleForums Senior Member
Joined
Dec 25, 2002
Messages
3,026
Reaction score
0
Location
LOL
I click on the link, and it has an error and closes my web browser
 

NewPosts

New threads

Top