• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

how do you include a java script in an html page

kcthomas

Senior member
i found this java script that makes tables sortable from here:

http://www.kryogenix.org/code/browser/sorttable/

i copied the script and put it into the same folder as the html file. then i made a test table to see if it would work (i just copied the source of the table that they use on the page above). when i load the page it does not do anything. i also tried just copying the source of the whole page and loading it, and that didn't work either.

is there something else you need in order to enable java script for a page? thanks
 
he's got full instructions here:

To make a table of your choice sortable, there are three steps:

1. Include the Javascript library, by putting a link to it in the HEAD of your page, like so:

<script src="sorttable.js">

2. Mark your table as a sortable one by giving it a class of "sortable":

<table class="sortable">

3. Ensure that your table has an ID:

<table class="sortable" id="unique_id">
 
i just copied this from that page (using firefox, did view page source and copied that particular code). the sorttables.js is in the same folder as the html file.
 
i got it, instead of using src to include the script i just copied and pasted it into the html file. thanks for the help
 
Back
Top