Link to home
Start Free TrialLog in
Avatar of Tim
Tim

asked on

Table Sort function not working when table created in BehindFile

I am running a JavaScript table Sort function Within the header of my main ASP file:

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

I am creating the table using my ASP BehindFile (via an AJAX call):

Response.Write("<table class=" & chr(34) & "sortable" & chr(34) & "border=" & chr(34) & "5" & chr(34) & ">")
Misc table data....
Response.Write("</table>")

The table comes out ok but the sort function is not enabled. The function worked when I was creating the table from my main ASP file, but when I moved it to the ASP BehindFile it stopped working.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tim
Tim

ASKER

I am currently updating the page to asp.net from classic asp once completed I will circle back around with this issue to completion.

Thanks
Avatar of Tim

ASKER

Needed to add runat=server and needed to enclose the js file path in <%ResolveUrl=%> brackets.