42 coaches online • Server time: 13:27
Forum Chat
Log in
Recent Forum Topics goto Post War Drums?goto Post Conceding v Goblins/...goto Post Advice tabletop tour...
SearchSearch 
Post new topic   Reply to topic
View previous topic Log in to check your private messages View next topic
darkwing2k6



Joined: Jun 28, 2007

Post   Posted: Mar 20, 2010 - 19:29 Reply with quote Back to top

hello folks, im trying to make the tables/columns in my team bios "sortable". i have googled the solution and everything i read says to insert the following in my page header-

Code:
<script src="sorttable.js"></script>


and then this in my table heading-

Code:
<table class="sortable">


trouble im having is that when i put it into my table the first part of script coding disappears. this is the full code that i am using (note: the "sorttable.js" is the script i was advised to download to get the table working in my browser)-

Code:


<script src="sorttable.js"><p align="center"><input  type="button" style='width:200px;' value="Show Franchise Records " onclick="x=document.getElementById('hide3');if(x.style.display != 'none'){x.style.display = 'none'; this.value='Show Franchise Records'}else{x.style.display = 'block';this.value='Hide Franchise Records';}"><div id=hide3 style='display:none'><table class="sortable" id="1" border="1" cellpadding="0" cellspacing="0" width="600"><!--
-->  <tr><!--
-->    <td colspan="600" bgcolor="#000000" table border="3" width="100%" bordercolor="#000000" class="unsortable"><div align="center"><strong><span class="style3"><font color="#FFFFFF">All Time Records</font></span></strong></div></td><!--
-->  </tr><!--
--><tr  align="center" bgcolor="#000000"><!--
--><th align="center" width="200"><font color="#FFFFFF"><div align="center">Statistic</div></th><!--
--><th align="center" width="200"><font color="#FFFFFF"><div align="center">Player</div></th><!--
--><th align="center" width="200"><font color="#FFFFFF"><div align="center">Record</div></th><!--
--></tr><!--
--><tr><!--
--><td  bgcolor="#000000"><font color="#FFFFFF"><div align="center"><b>Passing Yards</b></div></td><!--
--><td><div align="center">r1c1</div></td><!--
--><td><div align="center">r1c2</div></td><!--
--></tr><!--
--><tr  valign="top"><!---
--><td bgcolor="#000000"><font color="#FFFFFF"><div align="center"><b>Rushing Yards</b></div></td><!--
--><td><div align="center">r2c1</div></td><!--
--><td><div align="center">r2c2</div></td><!--
--></tr><!--
--><tr  valign="top"><!--
--><td bgcolor="#000000"><font color="#FFFFFF"><div align="center"><b>Touchdowns</b></div></td><!--
--><td><div align="center">r3c1</div></td><!--
--><td><div align="center">r3c2</div></td><!--
--></tr><!--
--><tr  valign="top"><!--
--><td bgcolor="#000000"><font color="#FFFFFF"><div align="center"><b>Most Tackles</b></div></td><!--
--><td><div align="center">r4c1</div></td><!--
--><td><div align="center">r4c2</div></td><!--
--></tr><!--
--><tr  valign="top"><!--
--><td bgcolor="#000000"><font color="#FFFFFF"><div align="center"><b>Sacks</b></div></td><!--
--><td><div align="center">r5c1</div></td><!--
--><td><div align="center">r5c2</div></td><!--
--></tr><!--
--><tr  valign="top"><!--
--><td bgcolor="#000000"><font color="#FFFFFF"><div align="center"><b>MVP</b></div></td><!--
--><td><div align="center">r5c1</div></td><!--
--><td><div align="center">r5c2</div></td><!--
--></tr><!--
--></table></div></script>


any help on this would be greatly appreciated

cheers
john
Woodstock



Joined: Dec 11, 2004

Post   Posted: Mar 20, 2010 - 19:42 Reply with quote Back to top

First of all, use ' instead of ". And second, I'm not sure the <script>-tag works.
SeraphimRed



Joined: Feb 01, 2004

Post   Posted: Mar 20, 2010 - 20:13 Reply with quote Back to top

Script tag doesn't work afaik (just easier for the site admin I guess) - you need to use dhtml without script. Most things can be achieved with a few simple styles.

_________________

Enhance YOUR FUMBBL


Image
darkwing2k6



Joined: Jun 28, 2007

Post   Posted: Mar 20, 2010 - 20:20 Reply with quote Back to top

ok thanks guys Smile il check into the dhtml route
SeraphimRed



Joined: Feb 01, 2004

Post   Posted: Mar 21, 2010 - 09:29 Reply with quote Back to top

I'm sure you know this but for any others reading I should add that although the script tag is stripped, the site doesn't strip out embedded element script, eg...

Code:

-->      <img  id="Wolverhampton Wonderdead" onmouseover="document.body.style.cursor='pointer';" onmouseout="document.body.style.cursor='default';" onclick="win = window.open('','401664',config='height=400,width=250');win.document.write('<div align=center><img align=middle src=\''+this.src+'\'><br><a target=\'_blank\' href=\'http://fumbbl.com/FUMBBL.php?page=team&op=view&showmatches=1&team_id=401664\'>'+this.id+'</a><table border=\'2\' cellspacing=\'0\' bordercolor=\'#FFFFFF\' bgcolor=\'#008000\' style=\'color: #FFFFFF\'><tr><td>W/D/L</td><td>32/8/23</td></tr><tr><td>CAS diff.</td><td>26/6/8</td></tr><tr><td>Earnings</td><td>3310K</td></tr><tr><td>Luck</td><td>59%</td></tr><tr><td colspan=\'2\'>Recent Games</td></tr><tr><td>West Ham Unitedead</td><td><a target=\'_blank\' href=\'http://fumbbl.com/FUMBBL.php?page=match&op=view&id=2958868\'>1 - 2</a></td></tr><tr><td>Aberdoom</td><td><a target=\'_blank\' href=\'http://fumbbl.com/FUMBBL.php?page=match&op=view&id=2919205\'>1 - 2</a></td></tr><tr><td>Nuln Park Rangers</td><td><a target=\'_blank\' href=\'http://fumbbl.com/FUMBBL.php?page=match&op=view&id=2911311\'>2 - 0</a></td></tr></table>');"   src="http://fumbbl.com/FUMBBL/Images/Player/185/185534.jpg" width="132" height="112"><p align="center"><!--


Weird huh? Wink
So the downside is that you need to do more inline which is just tedious.

_________________

Enhance YOUR FUMBBL


Image
Display posts from previous:     
 Jump to:   
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Log in to check your private messages View next topic