Checkboxes error.

Discussion in 'JavaScript' started by smallbadad, Dec 20, 2005.

  1. #1
    i am running this script on my site and in the status bar it says error. i have narrowed it down to this script but im not very good at javascript so please help.

    
    // formStyle.js, produced by Philip Howard, GamingHeadlines.co.uk
    // This JavaScript is open source and freely available to all those who wish to use it.
    // A link back to GamingHeadlines.co.uk would be appreciated!
    
    	function toggleCheckbox(cbId,cbKey,ffId)
    	{
    	if (cbKey==0||cbKey==32){
    	var cbFF = document.getElementById(ffId);
    	
    		var cbFFValue = cbFF.checked;
    		
    		if(cbId.className.indexOf("checkboxchecked")<0)
    			{
    				var checkBoxType = cbId.className.replace("checkbox","");
    				cbFF.checked=true;cbId.className="checkboxchecked"+checkBoxType;}
    			else
    			{
    				var checkBoxType = cbId.className.replace("checkboxchecked","");
    				cbFF.checked=false;cbId.className="checkbox"+checkBoxType;}
    	return false;
    		}
    	}
    	
    	function InitialiseCheckboxes()
    	{
    		var inputFields = document.getElementsByTagName("span");
    		var checkboxIndex = 0;
    		for (var inputIndex=0;inputIndex<inputFields.length;inputIndex++)
    			{
    				if (inputFields[inputIndex].className=="cbstyled")
    					{
    						var styleType = "";
    						if (inputFields[inputIndex].getAttribute("name")!=null){styleType=inputFields[inputIndex].getAttribute("name");}
    						
    						var inputCurrent = inputFields[inputIndex].getElementsByTagName("input").item(0);
    						if(inputCurrent.getAttribute("type")=="checkbox")
    						{
    							inputCurrent.className = "inputhidden";
    							inputCurrent.setAttribute("id","styledcheckbox"+checkboxIndex);
    							
    							if(navigator.appName.indexOf("Internet Explorer")>0)
    							{
    								//Internet Explorer
    								var inputHTML = inputFields[inputIndex].innerHTML;
    								var styledHTML = "<a"//href=\"#\""
    								styledHTML+=" tabindex=\""+inputIndex+"\"";
    								//styledHTML+=" name=\""+inputCurrent.getAttribute("name")+"\""
    								
    								if(inputCurrent.hasAttribute){if(inputCurrent.hasAttribute("title")){styledHTML+=" title=\""+inputCurrent.getAttribute("title")+"\"";}}
    								
    								if (inputCurrent.checked)
    									{styledHTML+=" class=\"checkboxchecked"+styleType+"\""}
    									else
    									{styledHTML+=" class=\"checkbox"+styleType+"\""}
    									
    								styledHTML+=" onClick=\"toggleCheckbox(this,'','styledcheckbox"+checkboxIndex+"');return false;\""
    								styledHTML+=" onKeyPress=\"return toggleCheckbox(this,event.keyCode,'styledcheckbox"+checkboxIndex+"');\""
    								
    								styledHTML+="></a>"
    								
    								inputFields[inputIndex].innerHTML = inputHTML+styledHTML;
    								inputFields[inputIndex].className = "checkbox"+styleType;
    							}
    							else
    							{
    								var styledCheckbox = document.createElement("a"); 
    								styledCheckbox.setAttribute("href","#");
    								
    								if(inputCurrent.hasAttribute){if(inputCurrent.hasAttribute("title")){styledCheckbox.setAttribute("title",inputCurrent.getAttribute("title"));}}
    								
    								styledCheckbox.setAttribute("onClick","toggleCheckbox(this,'','styledcheckbox"+checkboxIndex+"');return false;");
    								styledCheckbox.setAttribute("onKeyPress","return toggleCheckbox(this,event.keyCode,'styledcheckbox"+checkboxIndex+"');");
    								
    								if (inputCurrent.checked)
    									{styledCheckbox.className="checkboxchecked"+styleType;}
    									else
    									{styledCheckbox.className="checkbox"+styleType;}
    								inputFields[inputIndex].appendChild(styledCheckbox);
    							}
    							
    							checkboxIndex++;
    						}
    					}
    			}	
    	}
    	
    	function toggleRadiobox(rbObj,rbKey,rbGroup,rbId)
    	{
    	if (rbKey==0||rbKey==32){
    	var inputFields = document.getElementsByTagName("a");
    		for (var inputIndex=0;inputIndex<inputFields.length;inputIndex++)
    			{
    				if (inputFields[inputIndex].getAttribute("name")==rbGroup){
    					
    					if(inputFields[inputIndex].className.indexOf("radioboxchecked")<0)
    									{var RadioBoxType = inputFields[inputIndex].className.replace("radiobox","");}
    									else
    									{var RadioBoxType = inputFields[inputIndex].className.replace("radioboxchecked","");}
    									
    					inputFields[inputIndex].className="radiobox"+RadioBoxType;
    					}
    			}
    	var inputFields = document.getElementsByTagName("input");
    		for (var inputIndex=0;inputIndex<inputFields.length;inputIndex++)
    			{
    				if (inputFields[inputIndex].getAttribute("name")==rbGroup)
    					{
    						if (inputFields[inputIndex].getAttribute("id")==rbId)
    							{
    								if(rbObj.className.indexOf("radioboxchecked")<0)
    									{var RadioBoxType = rbObj.className.replace("radiobox","");}
    									else
    									{var RadioBoxType = rbObj.className.replace("radioboxchecked","");}
    
    								inputFields[inputIndex].checked = true;rbObj.className="radioboxchecked"+RadioBoxType;}
    							else
    							{inputFields[inputIndex].checked = false;}
    					}
    			}
    	return false;
    	}
    	}
    	
    	function InitialiseRadioboxes()
    	{
    		var inputFields = document.getElementsByTagName("span");
    		var radioboxIndex = 0;
    		
    		for (var inputIndex=0;inputIndex<inputFields.length;inputIndex++)
    			{
    				if (inputFields[inputIndex].className=="rbstyled")
    					{
    						var styleType = "";
    						if (inputFields[inputIndex].getAttribute("name")!=null){styleType=inputFields[inputIndex].getAttribute("name");}
    						
    						var inputCurrent = inputFields[inputIndex].getElementsByTagName("input").item(0);
    						if(inputCurrent.getAttribute("type")=="radio")
    						{
    							//inputCurrent.setAttribute("class","inputhidden");
    							inputCurrent.className = "inputhidden";
    							inputCurrent.setAttribute("id","styledradiobox"+radioboxIndex);
    							
    							if(navigator.appName.indexOf("Internet Explorer")>0)
    							{
    								//Internet Explorer
    								var inputHTML = inputFields[inputIndex].innerHTML;
    								var styledHTML = "<a"//href=\"#\""
    								styledHTML+=" tabindex=\"1"+inputIndex+"\"";
    								
    								styledHTML+=" name=\""+inputCurrent.getAttribute("name")+"\""
    								
    								if(inputCurrent.hasAttribute){if(inputCurrent.hasAttribute("title")){styledHTML+=" title=\""+inputCurrent.getAttribute("title")+"\"";}}
    								
    								if (inputCurrent.checked)
    									{styledHTML+=" class=\"radioboxchecked"+styleType+"\""}
    									else
    									{styledHTML+=" class=\"radiobox"+styleType+"\""}
    									
    								styledHTML+=" onClick=\"toggleRadiobox(this,'','"+inputCurrent.getAttribute("name")+"','styledradiobox"+radioboxIndex+"');return false;\""
    								styledHTML+=" onKeyPress=\"return toggleRadiobox(this,event.keyCode,'"+inputCurrent.getAttribute("name")+"','styledradiobox"+radioboxIndex+"');\""
    								
    								styledHTML+="></a>"
    								
    								inputFields[inputIndex].innerHTML = inputHTML+styledHTML;
    								inputFields[inputIndex].className = "radiobox"+styleType;
    							}
    							else
    							{
    								//Firefox, Opera, Netscape
    								var styledRadiobox = document.createElement("a"); 
    								styledRadiobox.setAttribute("href","#");
    								styledRadiobox.setAttribute("name",inputCurrent.getAttribute("name"));
    								
    								if(inputCurrent.hasAttribute){if(inputCurrent.hasAttribute("title")){styledRadiobox.setAttribute("title",inputCurrent.getAttribute("title"));}}
    								
    								styledRadiobox.setAttribute("onClick","toggleRadiobox(this,'','"+inputCurrent.getAttribute("name")+"','styledradiobox"+radioboxIndex+"');return false;");
    								styledRadiobox.setAttribute("onKeyPress","return toggleRadiobox(this,event.keyCode,'"+inputCurrent.getAttribute("name")+"','styledradiobox"+radioboxIndex+"');");
    								
    								if (inputCurrent.checked)
    									{styledRadiobox.className="radioboxchecked"+styleType;}
    									else
    									{styledRadiobox.className="radiobox"+styleType;}
    								
    								inputFields[inputIndex].appendChild(styledRadiobox);
    							}
    							
    							radioboxIndex++;
    						}
    					}
    			}	
    	}
    	
    	function checkImages() {
    	  if (document.getElementById) {
    		var x = document.getElementById('formStyleTestImage').offsetWidth;
    		if (x == '1'||x == '7') {
    			document.getElementById('formStyleTestImage').style.display='none';
    			return true;
    		}else{
    			return false;
    		}
    	  }
    	}
    	
    	function preloadImages()
    		{
    		img1 = new Image();img1.src = "templates/gamingtalk/images/CheckboxUnchecked.gif";
    		img1 = new Image();img1.src = "templates/gamingtalk/images/CheckboxChecked.gif";
    		
    		img2 = new Image();img1.src = "templates/gamingtalk/images/RadioboxUnchecked.gif";
    		img2 = new Image();img1.src = "templates/gamingtalk/images/RadioboxChecked.gif";
    		}
    	
    	function Initialise()
    		{
    			if(checkImages()){preloadImages();InitialiseCheckboxes();InitialiseRadioboxes();}
    		}
    		
    	window.onload = Initialise;
    
    Code (markup):
    ps thank you
     
    smallbadad, Dec 20, 2005 IP
  2. Cybernaut

    Cybernaut Peon

    Messages:
    408
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Provide a link to the page on which this script is running.
     
    Cybernaut, Dec 20, 2005 IP
  3. smallbadad

    smallbadad Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sorry i cant because i havnt uploaded it yet but here is a screen shot and the html of the page:

    [​IMG]

    
    <!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" dir="ltr">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="top" href="./index.php?sid=6b445702511fb3bf91580239aa9b1b57" title="Gamers-Talk.com Forum Index" />
    <link rel="search" href="./search.php?sid=6b445702511fb3bf91580239aa9b1b57" title="Search" />
    <link rel="help" href="./faq.php?sid=6b445702511fb3bf91580239aa9b1b57" title="FAQ" />
    <link rel="author" href="./memberlist.php?sid=6b445702511fb3bf91580239aa9b1b57" title="Memberlist" />
    <title>Gamers-Talk.com :: Index</title>
    <link rel="stylesheet" href="templates/gamingtalk/gamingtalk.css" type="text/css" />
    <script language="javascript" type="text/javascript" src="templates/gamingtalk/scripts.js"></script>
    <script language="javascript" type="text/javascript" src="templates/gamingtalk/formStyle.js"></script>
    <link rel="icon" href="templates/gamingtalk/images/favicon.ico" />
    
    <script language="Javascript" type="text/javascript">
    <!--
    var PreloadFlag = false;
    var expDays = 90;
    var exp = new Date(); 
    var tmp = '';
    var tmp_counter = 0;
    var tmp_open = 0;
    
    exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
    
    function SetCookie(name, value) 
    {
    	var argv = SetCookie.arguments;
    	var argc = SetCookie.arguments.length;
    	var expires = (argc > 2) ? argv[2] : null;
    	var path = (argc > 3) ? argv[3] : null;
    	var domain = (argc > 4) ? argv[4] : null;
    	var secure = (argc > 5) ? argv[5] : false;
    	document.cookie = name + "=" + escape(value) +
    		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    		((path == null) ? "" : ("; path=" + path)) +
    		((domain == null) ? "" : ("; domain=" + domain)) +
    		((secure == true) ? "; secure" : "");
    }
    
    function getCookieVal(offset) 
    {
    	var endstr = document.cookie.indexOf(";",offset);
    	if (endstr == -1)
    	{
    		endstr = document.cookie.length;
    	}
    	return unescape(document.cookie.substring(offset, endstr));
    }
    
    function GetCookie(name) 
    {
    	var arg = name + "=";
    	var alen = arg.length;
    	var clen = document.cookie.length;
    	var i = 0;
    	while (i < clen) 
    	{
    		var j = i + alen;
    		if (document.cookie.substring(i, j) == arg)
    			return getCookieVal(j);
    		i = document.cookie.indexOf(" ", i) + 1;
    		if (i == 0)
    			break;
    	} 
    	return null;
    }
    
    function ShowHide(id1, id2, id3) 
    {
    	var res = expMenu(id1);
    	if (id2 != '') expMenu(id2);
    	if (id3 != '') SetCookie(id3, res, exp);
    }
    	
    function expMenu(id) 
    {
    	var itm = null;
    	if (document.getElementById) 
    	{
    		itm = document.getElementById(id);
    	}
    	else if (document.all)
    	{
    		itm = document.all[id];
    	} 
    	else if (document.layers)
    	{
    		itm = document.layers[id];
    	}
    	if (!itm) 
    	{
    		// do nothing
    	}
    	else if (itm.style) 
    	{
    		if (itm.style.display == "none")
    		{ 
    			itm.style.display = ""; 
    			return 1;
    		}
    		else
    		{
    			itm.style.display = "none"; 
    			return 2;
    		}
    	}
    	else 
    	{
    		itm.visibility = "show"; 
    		return 1;
    	}
    }
    
    function showMenu(id)
    {
    	var itm = null;
    	if (document.getElementById) 
    	{
    		itm = document.getElementById(id);
    	}
    	else if (document.all)
    	{
    		itm = document.all[id];
    	} 
    	else if (document.layers)
    	{
    		itm = document.layers[id];
    	}
    	if (!itm) 
    	{
    		// do nothing
    	}
    	else if (itm.style) 
    	{
    		if (itm.style.display == "none")
    		{ 
    			itm.style.display = ""; 
    			return true;
    		}
    		else
    		{
    //			itm.style.display = "none"; 
    			return true;
    		}
    	}
    	else 
    	{
    		itm.visibility = "show"; 
    		return true;
    	}
    }
    
    function hideMenu(id)
    {
    	var itm = null;
    	if (document.getElementById) 
    	{
    		itm = document.getElementById(id);
    	}
    	else if (document.all)
    	{
    		itm = document.all[id];
    	} 
    	else if (document.layers)
    	{
    		itm = document.layers[id];
    	}
    	if (!itm) 
    	{
    		// do nothing
    	}
    	else if (itm.style) 
    	{
    		if (itm.style.display == "none")
    		{ 
    //			itm.style.display = ""; 
    			return true;
    		}
    		else
    		{
    			itm.style.display = "none"; 
    			return true;
    		}
    	}
    	else 
    	{
    		itm.visibility = "hide"; 
    		return true;
    	}
    }
    
    function showStatus(id)
    {
    	var itm = null;
    	if (document.getElementById)
    	{
    		itm = document.getElementById(id);
    	}
    	else if (document.all)
    	{
    		itm = document.all[id];
    	}
    	else if (document.layers)
    	{
    		itm = document.layers[id];
    	}
    	
    	if(!itm)
    	{
    		// do nowt
    	}
    	else if (itm.style)
    	{
    		if (itm.style.display == "none")
    		{
    			window.status = 'Click to Expand';
    			return true;
    		}
    		else
    		{
    			window.status = 'Click to Collapse';
    			return true;
    		}
    	}
    	else
    	{
    		window.status = 'Help';
    		return true;
    	}
    }
    //-->
    </script>
    
    </head>
    <body>
    <a name="top"></a>
    <table width="800" cellspacing="0" cellpadding="0" border="0" align="center" id="maintable">
    <tr>
    	<td valign="top" class="content-row"><table border="0" width="100%" cellspacing="0" cellpadding="0" id="logotable">
    	<tr>
    		<td align="center" class="logorow" height="88"></td>
    	</tr>
    	</table>
    	<table border="0" width="100%" cellspacing="0" cellpadding="0" id="buttonstable">
    	<tr>
    		<td align="center" valign="middle" width="100%" id="header-buttons">
    			<a href="index.php">Index</a> • 
    			 
    			<a href="profile.php?mode=register&amp;sid=6b445702511fb3bf91580239aa9b1b57">Register</a> • 
    			 
    			 
    			<a href="search.php?sid=6b445702511fb3bf91580239aa9b1b57">Search</a> • 
    			<a href="faq.php?sid=6b445702511fb3bf91580239aa9b1b57">FAQ</a> • 
    			<a href="memberlist.php?sid=6b445702511fb3bf91580239aa9b1b57">Memberlist</a> • 
    			<a href="groupcp.php?sid=6b445702511fb3bf91580239aa9b1b57">Usergroups</a> • 
    			<a href="login.php?sid=6b445702511fb3bf91580239aa9b1b57">Log in</a> 
    		</td>
    	</tr>
    	</table>
    	<table border="0" width="100%" cellspacing="0" cellpadding="0" class="content">
    	<tr>
    		<td class="content" valign="top">
    
    		<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
      <tr> 
    	<td>
    		<div align="center">
    		<!-- XS News Template: subSilver -->
    <!-- XS News Version: XS News Version: 2.0.3 -->
    <table border="0" cellspacing="0" cellpadding="0" width="100%" class="forumheader">
    	<tr>
    		<td align="left" valign="bottom" width="25"><img src="templates/gamingtalk/images/hdr_left.gif" width="25" height="27" alt="" /></td>
    		<td align="center" class="forumheader-mid">Latest News</td>
    		<td align="right" valign="bottom" width="25"><img src="templates/gamingtalk/images/hdr_right.gif" width="25" height="27" alt="" /></td>
    	</tr></table>
    <table width="100%" cellpadding="0" cellspacing="0" class="forumline">
    <tbody>
    
    <tr><th style="height: 18px;">News Items</th></tr>
    <tr>
    	<td>
    		<table width="100%" cellpadding="2" cellspacing="0" border="0">
    				<tr>
    			<td width="75" valign="middle" class="row1 newsdate" nowrap="nowrap">19 Dec 2005</td>
    			<td valign="middle" class="row1 newsrow">gaming-talk.com is now sponsored by www.hemwalkhosting.com</td>
    		</tr>
    				<tr>
    			<td width="75" valign="middle" class="row1 newsdate" nowrap="nowrap">19 Dec 2005</td>
    			<td valign="middle" class="row1 newsrow">gaming-talk.com has now been open sign up now!</td>
    		</tr>
    				</table>
    	</td>
    </tr>
    </tbody>
    </table>		</div>
    	</td>
      </tr>
    </table>
    <table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
      <tr> 
    	<td align="left" valign="bottom">
    	<span class="nav"><br /><a href="index.php?sid=6b445702511fb3bf91580239aa9b1b57" class="nav">Gamers-Talk.com Forum Index</a><br /><br /></span></td>
      </tr>
    </table>
    
    <!-- start nav cell addition -->
    <table width="100%" cellspacing="0" cellpadding="2" border="0">
    <tr>
    <!-- Start left menu column -->
    <td width="160" align="left" valign="top"><!-- XS Nav Menu Template: Artemis -->
    <!-- XS Nav Menu Version:  -->
    
    
    <table border="0" cellspacing="0" cellpadding="0" width="180" class="forumheader">
    <tr>
    <td align="left" valign="bottom" width="25"><img src="templates/gamingtalk/images/hdr_left.gif" width="25" height="27" alt="" /></td>
    <td align="center" class="forumheader-mid"><a href="javascript:ShowHide('blk_7','blk2_7','block_7');" onmouseover="showStatus('blk_7'); return true;" onmouseout="window.status=' '; return true;">Menu</a></td>
    <td align="right" valign="bottom" width="25"><img src="templates/gamingtalk/images/hdr_right.gif" width="25" height="27" alt="" /></td>
    </tr>
    </table>
    <div id="blk_7" style="display: ''; position: relative;">
    <table width="180" cellpadding="0" cellspacing="0" class="forumline">
    
    
    <tr><th colspan="2">&nbsp;Forum</th></tr>
    <tr><td valign="top" class="row" style="padding: 0;">
    	<table  width="100%" cellspacing="0" cellpadding="0" border="0">
    	<tr valign="top">
    	<td height="10px"></td>
    	</tr>
    		<tr valign="top">
    	<td align="center" valign="middle" width="11"></td>
    		<td align="center" valign="middle" width="11" class="row"><img src="images/bullets/circle_white.gif" width="11" height="11" alt="" border="0" /></td>
    
    	<td align="left" class="row menulinks"><a href="index.php" target="_self" class="menulinks">Index</a></td>
    		</tr>
    		<tr valign="top">
    	<td align="center" valign="middle" width="11"></td>
    		<td align="center" valign="middle" width="11" class="row"><img src="images/bullets/circle_white.gif" width="11" height="11" alt="" border="0" /></td>
    
    	<td align="left" class="row menulinks"><a href="Search.php" target="_self" class="menulinks">Search</a></td>
    		</tr>
    		<tr valign="top">
    	<td height="10px"></td>
    	</tr>
    	</table>
    </td>
    </tr>
    
    
    
    
    
    
    
    
    
    
    <tr><td align="center" class="row"><span class="gensmall"></span></td></tr>
    </table></div><div id="blk2_7" style="display: none; position: relative;"><table  width="180" cellpadding="0" cellspacing="1" border="0" class="forumline"><tr><td class="spacerow"  width="180" height="3"><img src="/images/spacer.gif" width="1" height="3" border="0" alt="" /></td></tr></table></div>
    <script language="javascript" type="text/javascript">
    <!--
    tmp = 'block_7';
    if(GetCookie(tmp) == '2')
    {
    	ShowHide('blk_7','blk2_7','block_7');
    }
    //-->
    </script>
    <table  width="180">
    	<tr valign="top">
    	<td height="10"></td>
    	</tr>
    </table>
    
    <table border="0" cellspacing="0" cellpadding="0" width="180" class="forumheader">
    <tr>
    <td align="left" valign="bottom" width="25"><img src="templates/gamingtalk/images/hdr_left.gif" width="25" height="27" alt="" /></td>
    <td align="center" class="forumheader-mid"><a href="javascript:ShowHide('blk_10','blk2_10','block_10');" onmouseover="showStatus('blk_10'); return true;" onmouseout="window.status=' '; return true;">Whos Online</a></td>
    <td align="right" valign="bottom" width="25"><img src="templates/gamingtalk/images/hdr_right.gif" width="25" height="27" alt="" /></td>
    </tr>
    </table>
    <div id="blk_10" style="display: ''; position: relative;">
    <table width="180" cellpadding="0" cellspacing="0" class="forumline">
    
    
    
    
    
    
    
    
    <tr><td class="row" align="center">
    <!-- Who's Online -->                  
    <table  width="100%" cellpadding="2" cellspacing="1" border="0">  
    <tr><td align="center">
    	<span class="gensmall">In total there is <b>1</b> user online :: 0 Registered, 0 Hidden and 1 Guest</span>
    	<hr />
    	<span class="gensmall">[ <span style="color:#F0E80A">Administrator</span> ]<br />[ <span style="color:#0AF035">Moderator</span> ]</span>
    	<hr />
    	<span class="gensmall">Registered Users: None</span>
    	<hr />
    	<span class="gensmall">Most users ever online was <b>2</b> on Mon Dec 19, 2005 11:56 pm</span>
    </td></tr>  
    </table>  
    <!-- Who's Online -->
    </td></tr>
    
    
    
    
    <tr><td align="center" class="row"><span class="gensmall"></span></td></tr>
    </table></div><div id="blk2_10" style="display: none; position: relative;"><table  width="180" cellpadding="0" cellspacing="1" border="0" class="forumline"><tr><td class="spacerow"  width="180" height="3"><img src="/images/spacer.gif" width="1" height="3" border="0" alt="" /></td></tr></table></div>
    <script language="javascript" type="text/javascript">
    <!--
    tmp = 'block_10';
    if(GetCookie(tmp) == '2')
    {
    	ShowHide('blk_10','blk2_10','block_10');
    }
    //-->
    </script>
    <table  width="180">
    	<tr valign="top">
    	<td height="10"></td>
    	</tr>
    </table>
    
    
    <!-- XS Nav Menu Template: Artemis --></td>
    <!-- end left menu column -->
    <!-- start main forum content column -->
    <td align="left" valign="top" width="100%">
    <!-- end of left nav column addition, but see below for correct end to html code -->
    
    	<table border="0" cellspacing="0" cellpadding="0" width="100%" class="forumheader">
    	<tr>
    		<td align="left" valign="bottom" width="25"><img src="templates/gamingtalk/images/hdr_left.gif" width="25" height="27" alt="" /></td>
    		<td align="center" class="forumheader-mid"><a href="index.php?c=1&amp;sid=6b445702511fb3bf91580239aa9b1b57">Test category 1</a></td>
    		<td align="right" valign="bottom" width="25"><img src="templates/gamingtalk/images/hdr_right.gif" width="25" height="27" alt="" /></td>
    	</tr></table>
    <table width="100%" cellpadding="2" cellspacing="0" class="forumline">
    <tbody>
    <tr> 
    	<th colspan="2">Forum</th>
    	<th width="50">Topics</th>
    	<th width="50">Posts</th>
    	<th>Last Post</th>
    </tr>
    <tr> 
    	<td class="row1" align="center" valign="middle" style="padding: 5px;"><img src="templates/gamingtalk/images/folder_big.gif" width="23" height="23" alt="No new posts" title="No new posts" /></td>
    	<td class="row1" width="100%"><span class="forumlink"> <script language="JavaScript" type="text/javascript">FolderStart('templates/gamingtalk/images/folder_big.gif');</script><a href="viewforum.php?f=1&amp;sid=6b445702511fb3bf91580239aa9b1b57" class="forumlink">Test Forum 1</a><script language="JavaScript" type="text/javascript">FolderEnd();</script><br />
    	  </span> <span class="genmed">This is just a test forum.<br />
    	  </span><span class="gensmall">&nbsp; &nbsp;</span></td>
    	<td class="row2" align="center" valign="middle"><span class="gensmall">2</span></td>
    	<td class="row2" align="center" valign="middle"><span class="gensmall">7</span></td>
    	<td class="row2" align="center" valign="middle" nowrap="nowrap"> <span class="gensmall">Mon Dec 19, 2005 9:07 pm<br /><a href="profile.php?mode=viewprofile&amp;u=2&amp;sid=6b445702511fb3bf91580239aa9b1b57">smallbadad</a> <a href="viewtopic.php?p=7&amp;sid=6b445702511fb3bf91580239aa9b1b57#7"><img src="templates/gamingtalk/images/post_old.gif" border="0" alt="View latest post" title="View latest post" /></a></span></td>
    </tr>
    </tbody>
    </table>
    <br class="spacer" />
    
    <table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
      <tr> 
    	<td align="left"><span class="gensmall"><a href="index.php?mark=forums&amp;sid=6b445702511fb3bf91580239aa9b1b57" class="gensmall">Mark all forums read</a></span></td>
    	<td align="right"><span class="gensmall">All times are GMT</span></td>
      </tr>
    </table>
    
    
    <!-- End forum content cell -->
    </td>
    <!-- Start right nav menu col, remove next 4 lines if right menu not required -->
    <!-- End right nav menu col -->
    </tr>
    </table>
    <!-- end of nav menu addition -->
    
    <br clear="all" />
    
    <table cellspacing="3" border="0" align="center" cellpadding="0">
      <tr> 
    	<td width="20" align="center"><img src="templates/gamingtalk/images/folder_new_big.gif" alt="New posts" width="23" height="23" /></td>
    	<td><span class="gensmall">New posts</span></td>
    	<td>&nbsp;&nbsp;</td>
    	<td width="20" align="center"><img src="templates/gamingtalk/images/folder_big.gif" alt="No new posts" width="23" height="23" /></td>
    	<td><span class="gensmall">No new posts</span></td>
    	<td>&nbsp;&nbsp;</td>
    	<td width="20" align="center"><img src="templates/gamingtalk/images/folder_locked_big.gif" alt="Forum is locked" width="23" height="23" /></td>
    	<td><span class="gensmall">Forum is locked</span></td>
      </tr>
    </table>
    <div align="center"><span class="copyright"><br /><br />
    Powered by <a href="http://www.phpbb.com/" target="_phpbb">phpBB</a> &copy; 2001, 2005 phpBB Group<br />Design by <a href="http://www.freestylexl.com">Freestyle XL</a> / <a href="http://www.flowersonline.tv">Flowers Online</a>.</span></div>
    		</td>
    	</tr>
    	</table></td>
    </tr>
    </table>
    </body>
    </html>
    
    Code (markup):
     

    Attached Files:

    smallbadad, Dec 20, 2005 IP
  4. Cybernaut

    Cybernaut Peon

    Messages:
    408
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It would be difficult to figure it out without looking at working page. Try to provide some detail about the error. Double click on the statusbar where it says 'Error', popup box will appear, click 'Show details', note the error and post here.
     
    Cybernaut, Dec 20, 2005 IP
  5. smallbadad

    smallbadad Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    ok ty didnt know about that :p

    it says:

    line: 196
    char: 3
    error: Object required
    code: 0

    :S im uploading the site now so ill post the url once ive done it
     
    smallbadad, Dec 20, 2005 IP
  6. smallbadad

    smallbadad Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ok it took me a while but i have now uploaded the site take a look via http://www.gaming-talk.com/
     
    smallbadad, Dec 20, 2005 IP
  7. Cybernaut

    Cybernaut Peon

    Messages:
    408
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Line 195 - formStyle.js - 'getElementById' could not find 'formStyleTestImage', it could not return an Object so its giving Object required error. There is no Image with Id 'formStyleTestImage' in the document.

    	function checkImages() {
    	  if (document.getElementById) {
    		var x = document.getElementById([B]'formStyleTestImage'[/B]).offsetWidth;
    		if (x == '1'||x == '7') {
    			document.getElementById('formStyleTestImage').style.display='none';
    			return true;
    		}else{
    			return false;
    		}
    	  }
    	}
    Code (markup):
    Here is an error is gamingtalk.css too, bottom-color value is invalid, it should be #000090:

    #buttonstable { 
    	margin-bottom: 5px; 
    	border-bottom: solid 1px [B]#0000090[/B];
    	border-top: solid 1px #000000;
    }
    Code (markup):
     
    Cybernaut, Dec 20, 2005 IP
  8. smallbadad

    smallbadad Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    its odd tho because it worked great then i installed some mods and its all messed up! thank you for trying but it didnt work Cybernaut :S
     
    smallbadad, Dec 21, 2005 IP
  9. smallbadad

    smallbadad Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    look at http://gaming-talk.com/test/ and goto register or search you can see that the checkboxes and radio buttons are cool :D thats all i want it to do >.<
     
    smallbadad, Dec 21, 2005 IP